Hello,
Welcome to our Microsoft Q&A platform!
in-app icons.
Do you develop application like App store?
If so, you want to change the different in-app icons for different theme, Here are screenshots about different theme for different images.
First of all, I use following demo to make test.
https://github.com/MGohil/XFThemesSample
Then open the ThemeResources
folder, Here are serveral themes,
I open BlueTheme.xaml
, I add following code in <ResourceDictionary>
tag.
<Style x:Key="ShowImage" TargetType="Image">
<Setter Property="Source" Value="icon.png"/>
</Style>
I open DarkTheme.xaml
, I add following code in <ResourceDictionary>
tag.
<Style x:Key="ShowImage" TargetType="Image">
<Setter Property="Source" Value="monkeyprofile.jpg"/>
</Style>
Note: I use different names for different images. If you want to change others theme, please add style as well.
Then, I apply style to Images, open the DashboardPage.xaml
, found imageCircle:CircleImage
, change the Source=xxxxx
to Style="{StaticResource ShowImage}"
<imageCircle:CircleImage
Grid.Column="1"
Aspect="AspectFill"
HeightRequest="100"
HorizontalOptions="End"
Style="{StaticResource ShowImage}"
VerticalOptions="End"
WidthRequest="100">
<imageCircle:CircleImage.GestureRecognizers>
<TapGestureRecognizer Command="{Binding GoToProfilePageCommand}" NumberOfTapsRequired="1" />
</imageCircle:CircleImage.GestureRecognizers>
</imageCircle:CircleImage>
Best Regards,
Leon Lu
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.