Change Font X-axis, Y-axis

2 posts, 0 answers
  1. Amitkumar
    Amitkumar avatar
    66 posts
    Member since:
    Aug 2009

    Posted 21 Sep 2011 Link to this post

    Hi
    I want to change fontName, FontSize
    <UserControl x:Class="TestView"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                 xmlns:tileview="clr-namespace:Telerik.Windows.Controls.TileView;assembly=Telerik.Windows.Controls.Navigation"
                 xmlns:telerikQuickStart="clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=Telerik.Windows.Controls"
                 xmlns:ReportControl="clr-namespace:ViewBase">
        <UserControl.Resources>
      
            <DataTemplate x:Key="CountryHeaderTemplate">
                <TextBlock Text="{Binding Name}" />
            </DataTemplate>
      
            <tileview:TileToFluideStateConverter x:Key="tileConverter" />
      
            <Style TargetType="TextBlock" x:Key="TextStyle">
                <Setter Property="FontSize" Value="12" />
                <Setter Property="FontFamily" Value="Verdana" />
            </Style>
      
            <Style TargetType="TextBlock" x:Key="TitleTextStyle" BasedOn="{StaticResource TextStyle}">
                <Setter Property="FontWeight" Value="Bold" />
            </Style>
      
            <DataTemplate x:Key="CountryTemplate">
                <telerik:RadFluidContentControl ContentChangeMode="Manual" TransitionDuration="0:0:.5"
                        State="{Binding State, Converter={StaticResource tileConverter}}">
      
                    <telerik:RadFluidContentControl.LargeContent>
                          
                          
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <ReportControl:ReportControl/>
                              
                              
                              
                        </Grid>
                         
      
                    </telerik:RadFluidContentControl.LargeContent>
                      
                      
                    <telerik:RadFluidContentControl.SmallContent>
                        <ReportControl:TileContent/>
                    </telerik:RadFluidContentControl.SmallContent>
                    <telerik:RadFluidContentControl.Content>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <ReportControl:ReportControl Grid.Column="1" Grid.Row="1"/>
                            <ReportControl:TileContent Grid.Column="2" Grid.Row="1">
                            </ReportControl:TileContent>
                        </Grid>
                    </telerik:RadFluidContentControl.Content>
                </telerik:RadFluidContentControl>
            </DataTemplate>
      
            <Style TargetType="telerik:RadTileView">
                <Setter Property="PreservePositionWhenMaximized" Value="True" />
                <Setter Property="telerik:TileViewPanel.IsVirtualized" Value="True" />
                <Setter Property="IsAutoScrollingEnabled" Value="True" />
                <Setter Property="TileStateChangeTrigger" Value="SingleClick" />
                <Setter Property="MinimizedColumnWidth" Value="180" />
                <Setter Property="MinimizedRowHeight" Value="155" />
                <Setter Property="RowHeight" Value="400" />
                <Setter Property="ColumnWidth" Value="700" />
                <Setter Property="ColumnsCount" Value="2" />
                <Setter Property="ContentTemplate" Value="{StaticResource CountryTemplate}" />
                <Setter Property="ItemTemplate" Value="{StaticResource CountryHeaderTemplate}" />
            </Style>
      
        </UserControl.Resources>
      
        <telerik:RadTileView ItemsSource="{Binding}" TileStateChanged="tileView_TileStateChanged" MinimizedItemsPosition="Bottom"
                    TileStateChangeTrigger="{Binding ElementName=StateChangeOption, Path=SelectedItem}"
                    MaximizeMode="{Binding ElementName=MaximizeModeOption, Path=SelectedItem}"
                    IsItemDraggingEnabled="{Binding ElementName=IsItemDraggingEnabledOption, Path=IsChecked}"
                    PreservePositionWhenMaximized="{Binding ElementName=PreservePositionWhenMaximizedOption, Path=IsChecked}">
        </telerik:RadTileView>
      
        <telerikQuickStart:QuickStart.ConfigurationPanel>
            <StackPanel Margin="3">
                <TextBlock Text="TileStateChangeTrigger" />
                <telerik:RadComboBox x:Name="StateChangeOption" SelectedIndex="2" Margin="0 2">
                    <telerik:TileStateChangeTrigger>None</telerik:TileStateChangeTrigger>
                    <telerik:TileStateChangeTrigger>SingleClick</telerik:TileStateChangeTrigger>
                    <telerik:TileStateChangeTrigger>DoubleClick</telerik:TileStateChangeTrigger>
                </telerik:RadComboBox>
                <TextBlock Text="MaximizeMode" Margin="0 5 0 0"/>
                <telerik:RadComboBox x:Name="MaximizeModeOption" SelectedIndex="1" Margin="0 2">
                    <telerik:TileViewMaximizeMode>Zero</telerik:TileViewMaximizeMode>
                    <telerik:TileViewMaximizeMode>ZeroOrOne</telerik:TileViewMaximizeMode>
                    <telerik:TileViewMaximizeMode>One</telerik:TileViewMaximizeMode>
                </telerik:RadComboBox>
                <CheckBox Content="IsItemDraggingEnabled" x:Name="IsItemDraggingEnabledOption" IsChecked="True" Margin="0 2"/>
                <CheckBox Content="PreservePositionWhenMaximized" x:Name="PreservePositionWhenMaximizedOption"
                        IsChecked="True" Margin="0 2"/>
            </StackPanel>
        </telerikQuickStart:QuickStart.ConfigurationPanel>
    </UserControl>
    of my x-axis and Y axis , I am creating chart run time.
    here i attached code , generating chart.
  2. Amitkumar
    Amitkumar avatar
    66 posts
    Member since:
    Aug 2009

    Posted 22 Sep 2011 Link to this post

    I found Solution
    <Grid x:Name="uxRAdChartRegion1" >

    <
    Grid.Resources>
                   <Style x:Key="AxisLabelStyle" TargetType="TextBlock">
                       <Setter Property="TextWrapping"  Value="Wrap" />
                       <Setter Property="FontSize" Value="8" />
                       <Setter Property="FontFamily" Value="Arial" />
                   </Style>
     
                   <Style x:Key="TitleStyle" TargetType="telerik:ChartTitle">
                       <Setter Property="HorizontalContentAlignment" Value="Center" />
                       <Setter Property="Background" Value="White" />
                       <Setter Property="BorderBrush" Value="White" />
                       <Setter Property="OuterBorderBrush" Value="White" />
                       <Setter Property="BorderThickness" Value="0" />
                       <Setter Property="OuterBorderThickness" Value="0" />
                       <Setter Property="FontWeight" Value="Normal" />
                       <Setter Property="Foreground" Value="Black" />
                       <Setter Property="FontSize" Value="10" />
                       <Setter Property="FontFamily" Value="Arial" />
                   </Style>
                    
                    
               </Grid.Resources>
    <Grid>


                oldRDChart.DefaultView.ChartArea.AxisX.AxisStyles.ItemLabelStyle = uxRAdChartRegion.Resources["AxisLabelStyle"] as Style;
                oldRDChart.DefaultView.ChartArea.AxisY.AxisStyles.ItemLabelStyle = uxRAdChartRegion.Resources["AxisLabelStyle"] as Style;
                oldRDChart.DefaultView.ChartTitle.Style = uxRAdChartRegion.Resources["TitleStyle"] as Style;
  3. DevCraft banner
Back to Top