Skip to content

Style class for AvatarView. #2298

Answered by GeorgeLeithead
OudomMunint asked this question in Q&A
Discussion options

You must be logged in to vote

In the Samples app, there is a page under Pages\Views\AvatarView\AvatarViewDayOfWeekPage.xaml. In there you can see how to apply styles, including WidthRequest and HeightRequest.

    xmlns:mct="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
.
.
.
                <Style x:Key="AvatarViewSamplesBase" TargetType="mct:AvatarView">
                    <Setter Property="BackgroundColor" Value="{AppThemeBinding Light=Black, Dark=White}" />
                    <!--  The actress who played Neytiri in Avatar (2009) is Zoe Saldana (ZS)  -->
                    <Setter Property="Text" Value="ZS" />
                    <Setter Property="TextColor" Value="Black" />
                    <Setter P…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@OudomMunint
Comment options

Answer selected by OudomMunint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants