This is a migrated thread and some comments may be shown as answers.

[Solved] How to format style

1 Answer 137 Views
DatePicker for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Paul
Top achievements
Rank 1
Paul asked on 19 Aug 2012, 02:56 AM
I reviewed the previous posts regarding styling the date selectors.  I'm looking to change the font in the listbox.  I tried changing the font and the fontsize in the xaml, but the text size doesn't change.

1 Answer, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 20 Aug 2012, 12:05 PM
Hi Paul,

 you can use implicit style to change the datetimepicker list items. Below is example of style using the default values, where you can change font sizes:

<telerik:RadDatePicker>
           <telerik:RadDatePicker.Resources>
               <Style TargetType="inputDateTime:DateTimeList">
                   <Setter Property="ItemTemplate">
                       <Setter.Value>
                           <DataTemplate>
                               <Grid VerticalAlignment="Stretch">
                                   <TextBlock Text="{Binding HeaderText}" FontFamily="Segoe UI Semilight" FontSize="26.667" Margin="5,0,0,16" VerticalAlignment="Bottom"/>
                                   <TextBlock Text="{Binding ContentText}" Opacity=".6" FontFamily="Segoe UI" FontSize="12" Margin="5,0,0,4" VerticalAlignment="Bottom"/>
                               </Grid>
                           </DataTemplate>
                       </Setter.Value>
                   </Setter>
               </Style>
           </telerik:RadDatePicker.Resources>
       </telerik:RadDatePicker>

where the namespace is:
xmlns:inputDateTime="using:Telerik.UI.Xaml.Controls.Input"


Let us know if this helps.

Regards,
Tsvyatko
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
DatePicker for XAML
Asked by
Paul
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Share this question
or