I'm trying to override the font for the XamDateTimeInput control
What is the correct style to base on?
For Numeric Editor, i can do this.
<Style TargetType="{x:Type editors:XamNumericEditor}" BasedOn="{x:Static igThemes:EditorsMetro.XamNumericEditor}"> </Style>
But i cannot locate under XamDateTimeInput igThemes:EditorsMetro
Hello Anthony,
One way to override XamDateTimeInput style when a theme is used is to define a style with BasedOn="{StaticResource {x:Type ig:XamDateTimeInput}}" and assign it the control's Style property.
---------------- <Style x:Key="myDateTimeInput" TargetType="{x:Type ig:XamDateTimeInput}" BasedOn="{StaticResource {x:Type ig:XamDateTimeInput}}"> <Setter Property="Foreground" Value="Red"/> </Style>... <ig:XamDateTimeInput Style="{StaticResource myDateTimeInput}"> </ig:XamDateTimeInput>----------------
I have created a sample of XamDateTimeInput that demonstrates the above approach.XamDateTimeInput.zip