Replies: 3 comments 14 replies
-
I think I remember something around changes to type expectations like this. I think you will need to subclass |
Beta Was this translation helpful? Give feedback.
-
So this code still has issues after migrating to latest code bits MCT 10.0.0 and .Net 9.0. It shows same red squiggly with same error. Does anyone have any idea how to resolve this error. Or how to use different images for light and dark at runtime? Is this possible and if so what am I doing wrong... |
Beta Was this translation helpful? Give feedback.
-
Ok, I am just going to perform the dynamic change in the page code-behind. Just is not going to work in the page XAML. |
Beta Was this translation helpful? Give feedback.
-
So I was doing this in .Net 7 with NO issues I thought but since moving to .Net 8 I am receiving and error on setting the ToolbarItem IconImageSource. Has anyone tried this and it works or am I doing something wrong? Or is there a better way to switch images by theme now?
Error : Invalid resource type: expected type is ImageSource, actual type is 'AppThemeObject'
<toolkit:AppThemeObject x:Key="MyAddImageSource" Dark="symboladdwhite.png" Light="symboladd.png" />
<ToolbarItem Command="{Binding AddAppointmentCommand}" IconImageSource="{toolkit:AppThemeResource MyAddImageSource}" Text="New" />
Thanks
Beta Was this translation helpful? Give feedback.
All reactions