Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Material][CalendarView] Make all property values on Setters from VisualStates accessible via ThemeResources. #1485

Open
ADD-Eugenio-Lopez opened this issue Oct 1, 2024 · 0 comments
Labels
kind/enhancement New feature or request

Comments

@ADD-Eugenio-Lopez
Copy link

What would you like to be added:

ThemeResources for property values that are currently set directly to Setters in VisualStates.

<VisualState x:Name="PointerOver">
<VisualState.Setters>
<Setter Target="Text.BorderBrush"
Value="{ThemeResource CalendarViewNavigationButtonBorderBrushPointerOver}" />
<Setter Target="Text.Foreground"
Value="{ThemeResource OnPrimaryMediumBrush}" />
<Setter Target="DownArrowGlyph.Fill"
Value="{ThemeResource OnPrimaryMediumBrush}" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Pressed">
<VisualState.Setters>
<Setter Target="Text.Foreground"
Value="{ThemeResource OnPrimaryLowBrush}" />
<Setter Target="DownArrowGlyph.Fill"
Value="{ThemeResource OnPrimaryLowBrush}" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Target="DownArrowGlyph.Opacity"
Value="0" />
</VisualState.Setters>

As you can see, the properties Text.Foreground and DownArrowGlyph.Fill have a general color of ThemeResources but these colors afects all the application style, what you need is to use a concrete ThemeResource like CalendarViewNavigationButtonBorderBrushPointerOver.

You can change the size of the font using properties DayItemFontSize and MonthYearItemFontFamily, but you cannot change the WeekDayName and it's always the same size.

Why is this needed:

It would be very useful since this way you can easily customize the style referring to concrete keys of the ThemeResource and properties from change all values. It would not be convenient to modify the template in any other way.

@ADD-Eugenio-Lopez ADD-Eugenio-Lopez added the kind/enhancement New feature or request label Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant