Telerik Forums
UI for WPF Forum
1 answer
161 views

Hello,

I spent some time but didn't find an answer to my questions. 

Is it possible to use HierarchyChildTemplate with MVVM approach?

The thing that I want to use a custom UserControl as DataTemplate inside HierarchyChildTemplate. I also want to use separate DataContext.

 

 

Regards,

Grigory

Vladimir Stoyanov
Telerik team
 answered on 10 Apr 2019
1 answer
674 views

I don't want that my client could change the slider value.

When I set Slider.IsEnable= false all the slider colors change to gray.

 

Dilyan Traykov
Telerik team
 answered on 10 Apr 2019
8 answers
625 views

Hello,

 I was trying to stylize the RadExpander component, however the style is not working as expected. When the application is started, all the Expander subitems shows something painted in white (I don't know if it is the background or another property) and I have tried hard to find out what is wrong, but I just couldn't.

The weird thing is that when I copy the code and paste it in Blend, it works as expected! So, the style don't work in Visual Studio 2013, but works in Blend for Visual Studio 2013. How could it be?

I'm sending the code I'm using and the prints of how I expect it to look like and how it's looking like now.

Thank you so much,

Evelyn

Nucleo


Images:
VS = Visual Studio 2013
Blend = Blend for Visual Studio 2013.

 

<Window x:Class="WpfApplication1.MainWindow"
        xmlns:System="clr-namespace:System;assembly=mscorlib"
        Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
        <!-- RadPanelItem colors -->
        <LinearGradientBrush x:Key="BackgroundButton" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFEB0A32" Offset="0.31"/>
            <GradientStop Color="#FFC3092A" Offset="1"/>
            <GradientStop Color="#FFEB0A32" Offset="0.008"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="BackgroundButtonSelected" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFC83C50" Offset="0.31"/>
            <GradientStop Color="#FF963637" Offset="1"/>
            <GradientStop Color="#FFC83C50" Offset="0.008"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="BackgroundButtonMouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFEB3C32" Offset="0.31"/>
            <GradientStop Color="#FFC33C2A" Offset="1"/>
            <GradientStop Color="#FFEB3C32" Offset="0.008"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="BackgroundButtonPressed" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFC83C50" Offset="0.31"/>
            <GradientStop Color="#FF963637" Offset="1"/>
            <GradientStop Color="#FFC83C50" Offset="0.008"/>
        </LinearGradientBrush>
 
        <!-- RadPanelItem Subitems colors -->
        <LinearGradientBrush x:Key="BackgroundButton2" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFC83C50" Offset="0.31"/>
            <GradientStop Color="#FF963637" Offset="1"/>
            <GradientStop Color="#FFC83C50" Offset="0.008"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="BackgroundButtonSelected2" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFC95868" Offset="0.31"/>
            <GradientStop Color="#FF955858" Offset="1"/>
            <GradientStop Color="#FFC95868" Offset="0.008"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="BackgroundButtonMouseOver2" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFFF3E61" Offset="0.31"/>
            <GradientStop Color="#FFD82C5B" Offset="1"/>
            <GradientStop Color="#FFFF3E61" Offset="0.008"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="BackgroundButtonPressed2" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFC95364" Offset="0.31"/>
            <GradientStop Color="#FF974F4F" Offset="1"/>
            <GradientStop Color="#FFC95364" Offset="0.008"/>
        </LinearGradientBrush>
 
 
 
 
        <!-- RadButton Style -->
        <Style TargetType="telerik:RadButton">
            <Setter Property="Margin" Value="10 10 10 10"/>
            <Setter Property="CornerRadius" Value="5"/>
            <Setter Property="Cursor" Value="Hand" />
            <Setter Property="Height" Value="50" />
        </Style>
 
 
 
 
 
        <!-- RadExpander Style -->
        <Style x:Key="RadExpanderStyle" TargetType="{x:Type telerik:RadExpander}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type telerik:RadExpander}">
                        <Grid HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="HeaderStateGroup">
                                    <VisualState x:Name="NormalHeader"/>
                                    <VisualState x:Name="MouseOverHeader">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Stroke" Storyboard.TargetName="OuterCircle">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                            <GradientStop Color="#FFD4D0C4"/>
                                                            <GradientStop Color="#FFB9B5AA" Offset="0.126"/>
                                                        </LinearGradientBrush>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Stroke" Storyboard.TargetName="InnerCircle">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <SolidColorBrush Color="#FF989898"/>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Fill" Storyboard.TargetName="OuterCircle">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                            <GradientStop Color="#FFEB3C32" Offset="0.31"/>
                                                            <GradientStop Color="#FFC33C2A" Offset="1"/>
                                                            <GradientStop Color="#FFEB3C32" Offset="0.008"/>
                                                        </LinearGradientBrush>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Fill" Storyboard.TargetName="arrow">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <SolidColorBrush Color="White"/>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="PressedHeader">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Stroke" Storyboard.TargetName="OuterCircle">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                            <GradientStop Color="#FFD4D0C4"/>
                                                            <GradientStop Color="#FFB9B5AA" Offset="0.126"/>
                                                        </LinearGradientBrush>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Stroke" Storyboard.TargetName="InnerCircle">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                            <GradientStop Color="#FFD4D0C4"/>
                                                            <GradientStop Color="#FFB9B5AA" Offset="1"/>
                                                        </LinearGradientBrush>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Fill" Storyboard.TargetName="OuterCircle">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                            <GradientStop Color="#FFEB000A" Offset="0.31"/>
                                                            <GradientStop Color="#FFC3000A" Offset="1"/>
                                                            <GradientStop Color="#FFEB000A" Offset="0.008"/>
                                                        </LinearGradientBrush>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Fill" Storyboard.TargetName="arrow">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <SolidColorBrush Color="White"/>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="HeaderOrientationGroup">
                                    <VisualState x:Name="HorizontalOrientation">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="LayoutTransform" Storyboard.TargetName="HeaderContentTransform">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <RotateTransform Angle="0"/>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Column)" Storyboard.TargetName="HeaderContentTransform">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <System:Int32>1</System:Int32>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="VerticalOrientation">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="LayoutTransform" Storyboard.TargetName="HeaderContentTransform">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <RotateTransform Angle="90"/>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Row)" Storyboard.TargetName="HeaderContentTransform">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <System:Int32>1</System:Int32>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="ExpandStateGroup">
                                    <VisualState x:Name="Expanded">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0:0:0.2" To="180" Storyboard.TargetProperty="(UIElement.RenderTransform).Angle" Storyboard.TargetName="arrow"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Collapsed">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).Angle" Storyboard.TargetName="arrow"/>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="ExpandDirectionStates">
                                    <VisualStateGroup.Transitions>
                                        <VisualTransition From="{x:Null}" GeneratedDuration="0" GeneratedEasingFunction="{x:Null}" To="{x:Null}">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Row)" Storyboard.TargetName="Content">
                                                    <DiscreteObjectKeyFrame KeyTime="0">
                                                        <DiscreteObjectKeyFrame.Value>
                                                            <System:Int32>0</System:Int32>
                                                        </DiscreteObjectKeyFrame.Value>
                                                    </DiscreteObjectKeyFrame>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Column)" Storyboard.TargetName="Content">
                                                    <DiscreteObjectKeyFrame KeyTime="0">
                                                        <DiscreteObjectKeyFrame.Value>
                                                            <System:Int32>0</System:Int32>
                                                        </DiscreteObjectKeyFrame.Value>
                                                    </DiscreteObjectKeyFrame>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Row)" Storyboard.TargetName="HeaderButton">
                                                    <DiscreteObjectKeyFrame KeyTime="0">
                                                        <DiscreteObjectKeyFrame.Value>
                                                            <System:Int32>0</System:Int32>
                                                        </DiscreteObjectKeyFrame.Value>
                                                    </DiscreteObjectKeyFrame>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Column)" Storyboard.TargetName="HeaderButton">
                                                    <DiscreteObjectKeyFrame KeyTime="0">
                                                        <DiscreteObjectKeyFrame.Value>
                                                            <System:Int32>0</System:Int32>
                                                        </DiscreteObjectKeyFrame.Value>
                                                    </DiscreteObjectKeyFrame>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Width" Storyboard.TargetName="col0">
                                                    <DiscreteObjectKeyFrame KeyTime="0">
                                                        <DiscreteObjectKeyFrame.Value>
                                                            <GridLength>Auto</GridLength>
                                                        </DiscreteObjectKeyFrame.Value>
                                                    </DiscreteObjectKeyFrame>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Width" Storyboard.TargetName="col1">
                                                    <DiscreteObjectKeyFrame KeyTime="0">
                                                        <DiscreteObjectKeyFrame.Value>
                                                            <GridLength>Auto</GridLength>
                                                        </DiscreteObjectKeyFrame.Value>
                                                    </DiscreteObjectKeyFrame>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Height" Storyboard.TargetName="row0">
                                                    <DiscreteObjectKeyFrame KeyTime="0">
                                                        <DiscreteObjectKeyFrame.Value>
                                                            <GridLength>Auto</GridLength>
                                                        </DiscreteObjectKeyFrame.Value>
                                                    </DiscreteObjectKeyFrame>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Height" Storyboard.TargetName="row1">
                                                    <DiscreteObjectKeyFrame KeyTime="0">
                                                        <DiscreteObjectKeyFrame.Value>
                                                            <GridLength>Auto</GridLength>
                                                        </DiscreteObjectKeyFrame.Value>
                                                    </DiscreteObjectKeyFrame>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualTransition>
                                    </VisualStateGroup.Transitions>
                                    <VisualState x:Name="DirectionLeft">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Width" Storyboard.TargetName="col0">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <GridLength>*</GridLength>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Height" Storyboard.TargetName="row0">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <GridLength>*</GridLength>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Column)" Storyboard.TargetName="HeaderButton">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <System:Int32>1</System:Int32>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <DoubleAnimation Duration="0" To="90" Storyboard.TargetProperty="(UIElement.RenderTransform).Angle" Storyboard.TargetName="arrowPanel"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="DirectionRight">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Width" Storyboard.TargetName="col1">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <GridLength>*</GridLength>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Height" Storyboard.TargetName="row0">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <GridLength>*</GridLength>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Column)" Storyboard.TargetName="Content">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <System:Int32>1</System:Int32>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <DoubleAnimation Duration="0" To="-90" Storyboard.TargetProperty="(UIElement.RenderTransform).Angle" Storyboard.TargetName="arrowPanel"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="DirectionUp">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Width" Storyboard.TargetName="col0">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <GridLength>*</GridLength>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Height" Storyboard.TargetName="row0">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <GridLength>*</GridLength>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Row)" Storyboard.TargetName="HeaderButton">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <System:Int32>1</System:Int32>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <DoubleAnimation Duration="0" To="180" Storyboard.TargetProperty="(UIElement.RenderTransform).Angle" Storyboard.TargetName="arrowPanel"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="DirectionDown">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Width" Storyboard.TargetName="col0">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <GridLength>*</GridLength>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Height" Storyboard.TargetName="row1">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <GridLength>*</GridLength>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Row)" Storyboard.TargetName="Content">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <System:Int32>1</System:Int32>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="3">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition x:Name="col0" Width="Auto"/>
                                        <ColumnDefinition x:Name="col1" Width="Auto"/>
                                    </Grid.ColumnDefinitions>
 
                                    <Grid.RowDefinitions>
                                        <RowDefinition x:Name="row2" Height="26"/>
                                        <RowDefinition x:Name="row0" Height="Auto"/>
                                        <RowDefinition x:Name="row1" Height="Auto"/>
                                    </Grid.RowDefinitions>
 
                                    <telerik:RadToggleButton x:Name="HeaderButton" Background="Transparent" ClickMode="{TemplateBinding ClickMode}" Foreground="{TemplateBinding Foreground}" FontWeight="{TemplateBinding FontWeight}" FocusVisualStyle="{x:Null}" FontStyle="{TemplateBinding FontStyle}" FontStretch="{TemplateBinding FontStretch}" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}" HorizontalAlignment="{TemplateBinding HorizontalHeaderAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalHeaderAlignment}" IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" InnerCornerRadius="0" TabIndex="{TemplateBinding TabIndex}" VerticalAlignment="{TemplateBinding VerticalHeaderAlignment}" VerticalContentAlignment="{TemplateBinding VerticalHeaderAlignment}">
                                        <telerik:RadToggleButton.Template>
                                            <ControlTemplate TargetType="{x:Type telerik:RadToggleButton}">
                                                <ContentPresenter x:Name="Content" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                            </ControlTemplate>
                                        </telerik:RadToggleButton.Template>
 
                                        <Grid x:Name="HeaderPanel" Background="Transparent" >
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="Auto"/>
                                                <ColumnDefinition Width="*"/>
                                            </Grid.ColumnDefinitions>
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto"/>
                                                <RowDefinition Height="*"/>
                                            </Grid.RowDefinitions>
                                            <Grid>
                                                <Rectangle x:Name="OuterCircle" Height="20" Stroke="#FF848484" VerticalAlignment="Center" Width="20" Fill="{StaticResource BackgroundButton}" />
                                                <Rectangle x:Name="InnerCircle" HorizontalAlignment="Center" Height="18" Stroke="#FF989898" VerticalAlignment="Center" Width="18"/>
 
                                                <Grid x:Name="arrowPanel" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Center" HorizontalAlignment="Center">
                                                    <Grid.RenderTransform>
                                                        <RotateTransform/>
                                                    </Grid.RenderTransform>
                                                    <Path x:Name="arrow" Data="M0,0L0.67,0 4,2.67 7.25,0 8,0 8,0.67 4,4 0,0.75z" Stroke="White" StrokeThickness="2" Fill="White" Height="10" RenderTransformOrigin="0.5,0.5" Stretch="None" Width="10" VerticalAlignment="Center" HorizontalAlignment="Center" >
                                                        <Path.RenderTransform>
                                                            <RotateTransform Angle="0"/>
                                                        </Path.RenderTransform>
                                                    </Path>
                                                </Grid>
                                            </Grid>
                                            <telerik:LayoutTransformControl x:Name="HeaderContentTransform" IsTabStop="False" RenderTransformOrigin="0.5,0.5">
                                                <ContentPresenter x:Name="HeaderContent" ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" Grid.Column="1" HorizontalAlignment="Stretch" Margin="5,0" VerticalAlignment="Stretch"/>
                                            </telerik:LayoutTransformControl>
                                        </Grid>
                                    </telerik:RadToggleButton>
 
                                    <ContentPresenter Grid.Row="1" x:Name="Content" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" Visibility="Collapsed" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                                </Grid>
                            </Border>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
 
            <Setter Property="Background" Value="Transparent" />
            <Setter Property="Cursor" Value="Help" />
            <Setter Property="IsTabStop" Value="False"/>
            <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
            <Setter Property="BorderBrush" Value="Transparent"/>
            <Setter Property="BorderThickness" Value="0"/>
        </Style>
 
 
 
 
 
        <!-- RadPanelBarItem Style -->
        <Style x:Key="RadPanelBarItemStyle" TargetType="telerik:RadPanelBarItem" >
            <Setter Property="Margin" Value="0 5 0 0" />
            <Setter Property="Cursor" Value="Hand" />
            <Setter Property="Background" Value="{StaticResource BackgroundButton}" />
            <Setter Property="FontSize" Value="14" />
            <Setter Property="FontWeight" Value="SemiBold" />
            <Setter Property="Foreground" Value="White" />
            <Setter Property="ChildItemsTemplate">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type telerik:RadPanelBarItem}">
                        <Grid x:Name="RootElement">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisual"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisual"/>
                                            <DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="Cursor" Storyboard.TargetName="CursorMouseOver" />
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="MouseOut">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisual"/>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="SelectionStates">
                                    <VisualState x:Name="Unselected"/>
                                    <VisualState x:Name="Selected">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectionVisual"/>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="ExpandStates">
                                    <VisualState x:Name="Expanded">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ItemsContainer">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <DoubleAnimation Duration="0:0:0.2" From="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ItemsContainer"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Collapsed"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Focused">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisual">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Unfocused">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisual">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Grid x:Name="HeaderRow" Background="Transparent">
                                <Border x:Name="CursorMouseOver" Cursor="Hand" />
                                <Border x:Name="MouseOverVisual" BorderBrush="#FF989898" BorderThickness="1" CornerRadius="1" Opacity="0" Background="{StaticResource BackgroundButton}" />
                                <Border x:Name="SelectionVisual" BorderBrush="#FF989898" BorderThickness="1" CornerRadius="1" Opacity="0" Background="{StaticResource BackgroundButtonSelected}" />
                                <Border x:Name="DisabledVisual" BorderBrush="#FF989898" BorderThickness="1" CornerRadius="1" Opacity="0">
                                    <Border BorderBrush="Transparent" BorderThickness="1" Background="#FFE0E0E0" CornerRadius="0"/>
                                </Border>
                                <ContentControl x:Name="Header" Background="{TemplateBinding Background}" ContentTemplate="{TemplateBinding HeaderTemplate}" Foreground="{TemplateBinding Foreground}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                <Rectangle x:Name="FocusVisual" IsHitTestVisible="False" RadiusY="2" RadiusX="2" Stroke="Black" StrokeThickness="1" StrokeDashArray="1 2" Visibility="Collapsed"/>
                            </Grid>
                            <Grid x:Name="ItemsContainer" Grid.Row="1" Visibility="Collapsed">
                                <ItemsPresenter/>
                            </Grid>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type telerik:RadPanelBarItem}">
                        <Grid x:Name="RootElement">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisual"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisual"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="MouseOut">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisual"/>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="SelectionStates">
                                    <VisualState x:Name="Unselected"/>
                                    <VisualState x:Name="Selected">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectionVisual"/>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="ExpandStates">
                                    <VisualState x:Name="Expanded">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ItemsContainer">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <DoubleAnimation Duration="0:0:0.2" From="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ItemsContainer"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Collapsed"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Focused">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisual">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Unfocused">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisual">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Grid x:Name="HeaderRow" Background="Transparent">
                                <Border x:Name="MouseOverVisual" BorderBrush="#FF989898" BorderThickness="1" CornerRadius="1" Opacity="0" Background="{StaticResource BackgroundButtonMouseOver}" />
                                <Border x:Name="SelectionVisual" BorderBrush="#FF989898" BorderThickness="1" CornerRadius="1" Opacity="0" Background="{StaticResource BackgroundButtonSelected}" />
                                <Border x:Name="DisabledVisual" BorderBrush="#FF989898" BorderThickness="1" CornerRadius="1" Opacity="0">
                                    <Border BorderBrush="Transparent" BorderThickness="1" Background="#FFE0E0E0" CornerRadius="0"/>
                                </Border>
                                <ContentControl x:Name="Header" ContentTemplate="{TemplateBinding HeaderTemplate}" Foreground="{TemplateBinding Foreground}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                <Rectangle x:Name="FocusVisual" IsHitTestVisible="False" RadiusY="2" RadiusX="2" Stroke="#FF989898" StrokeThickness="1" StrokeDashArray="1 2" Visibility="Collapsed"/>
                            </Grid>
                            <Grid x:Name="ItemsContainer" Grid.Row="1" Visibility="Collapsed">
                                <ItemsPresenter/>
                            </Grid>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
            <Setter Property="SnapsToDevicePixels" Value="True"/>
            <Setter Property="ItemsPanel">
                <Setter.Value>
                    <ItemsPanelTemplate>
                        <telerik:PanelBarPanel IsItemsHost="True"/>
                    </ItemsPanelTemplate>
                </Setter.Value>
            </Setter>
 
            <Style.Triggers>
                <Trigger Property="Level" Value="1">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type telerik:RadPanelBarItem}">
                                <Grid x:Name="RootElement" SnapsToDevicePixels="True">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="*"/>
                                    </Grid.RowDefinitions>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="NormalVisual"/>
                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisual"/>
                                                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="arrow"/>
                                                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Header"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisual"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="MouseOut"/>
                                        </VisualStateGroup>
                                        <VisualStateGroup x:Name="SelectionStates">
                                            <VisualState x:Name="Unselected"/>
                                            <VisualState x:Name="Selected">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectVisual"/>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                        <VisualStateGroup x:Name="ExpandStates">
                                            <VisualState x:Name="Expanded">
                                                <Storyboard>
                                                    <!--<DoubleAnimation Duration="0" To="180" Storyboard.TargetProperty="Angle" Storyboard.TargetName="directionRotation"/>-->
                                                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ItemsContainer">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <Visibility>Visible</Visibility>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <DoubleAnimation Duration="0:0:0.2" From="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ItemsContainer"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Collapsed"/>
                                        </VisualStateGroup>
                                        <VisualStateGroup x:Name="FocusStates">
                                            <VisualState x:Name="Focused">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisual">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <Visibility>Visible</Visibility>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Unfocused">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisual">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <Visibility>Collapsed</Visibility>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Grid x:Name="HeaderRow" Height="30" Width="Auto">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="*"/>
                                            <ColumnDefinition Width="Auto"/>
                                        </Grid.ColumnDefinitions>
                                        <Border x:Name="NormalVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="5">
                                            <Border BorderBrush="#FF989898" BorderThickness="1" Background="{TemplateBinding Background}"/>
                                        </Border>
                                        <Border x:Name="MouseOverVisual" BorderBrush="#FFCDCCC9" BorderThickness="1" Grid.ColumnSpan="5" Opacity="0" Background="{StaticResource BackgroundButtonMouseOver}">
                                            <Border BorderBrush="#FF989898" BorderThickness="1">
                                            </Border>
                                        </Border>
                                        <Border x:Name="SelectVisual" BorderThickness="1" Grid.ColumnSpan="5" Opacity="0" Background="{StaticResource BackgroundButtonSelected}">
                                            <Border.BorderBrush>
                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                    <GradientStop Color="#FFD4D0C4"/>
                                                    <GradientStop Color="#FFB9B5AA" Offset="1"/>
                                                </LinearGradientBrush>
                                            </Border.BorderBrush>
                                            <Border BorderThickness="1">
                                                <Border.BorderBrush>
                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                        <GradientStop Color="#FFD4D0C4"/>
                                                        <GradientStop Color="#FFB9B5AA" Offset="0.126"/>
                                                    </LinearGradientBrush>
                                                </Border.BorderBrush>
                                            </Border>
                                        </Border>
                                        <Border x:Name="DisabledVisual" BorderBrush="#FF989898" BorderThickness="1" Grid.ColumnSpan="5" Opacity="0">
                                            <Border BorderBrush="Transparent" BorderThickness="1" Background="#FFE0E0E0"/>
                                        </Border>
                                        <Path x:Name="arrow" Grid.Column="5" Data="M1,1.5L4.5,5 8,1.5" HorizontalAlignment="Right" Margin="7,0" Opacity="1" RenderTransformOrigin="0.5,0.5" Stretch="None" Stroke="White" StrokeThickness="2" VerticalAlignment="Center">
                                            <Path.RenderTransform>
                                                <RotateTransform Angle="0"/>
                                            </Path.RenderTransform>
                                        </Path>
                                        <ContentControl x:Name="Header" Grid.ColumnSpan="4" Margin="8 0 0 0" ContentTemplate="{TemplateBinding HeaderTemplate}" Foreground="{TemplateBinding Foreground}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="Center"/>
                                        <Rectangle x:Name="FocusVisual" Grid.ColumnSpan="5" Grid.Column="0" IsHitTestVisible="False" Stroke="Black" StrokeThickness="1" StrokeDashArray="1 2" Visibility="Collapsed"/>
                                    </Grid>
                                    <Grid x:Name="ItemsContainer" Grid.Row="1" Visibility="Collapsed">
                                        <telerik:LayoutTransformControl x:Name="transformationRoot" IsTabStop="False">
                                            <ItemsPresenter/>
                                        </telerik:LayoutTransformControl>
                                    </Grid>
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Trigger>
            </Style.Triggers>
 
        </Style>
 
 
 
 
 
        <!-- RadPanelBarItem2 Style -->
        <Style TargetType="telerik:RadPanelBarItem" >
            <Setter Property="Cursor" Value="Hand" />
            <Setter Property="Background" Value="{StaticResource BackgroundButton2}" />
            <Setter Property="FontSize" Value="14" />
            <Setter Property="FontWeight" Value="Normal" />
            <Setter Property="Margin" Value="10 5 5 0" />
            <Setter Property="Foreground" Value="White" />
            <Setter Property="ChildItemsTemplate">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type telerik:RadPanelBarItem}">
                        <Grid x:Name="RootElement">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisual"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0:0:0.0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisual"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="MouseOut">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0:0:0.0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisual"/>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="SelectionStates">
                                    <VisualState x:Name="Unselected"/>
                                    <VisualState x:Name="Selected">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectionVisual"/>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="ExpandStates">
                                    <VisualState x:Name="Expanded">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ItemsContainer">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <DoubleAnimation Duration="0:0:0.2" From="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ItemsContainer"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Collapsed"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Focused">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisual">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Unfocused">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisual">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Grid x:Name="HeaderRow" Background="Transparent">
                                <Border x:Name="MouseOverVisual" BorderBrush="#FF989898" BorderThickness="1" CornerRadius="1" Opacity="0" Background="{StaticResource BackgroundButton2}" />
                                <Border x:Name="SelectionVisual" BorderBrush="#FF989898" BorderThickness="1" CornerRadius="1" Opacity="0" Background="{StaticResource BackgroundButtonSelected2}" />
                                <Border x:Name="DisabledVisual" BorderBrush="#FF989898" BorderThickness="1" CornerRadius="1" Opacity="0">
                                    <Border BorderBrush="Transparent" BorderThickness="1" Background="#FFE0E0E0" CornerRadius="0"/>
                                </Border>
                                <ContentControl x:Name="Header" ContentTemplate="{TemplateBinding HeaderTemplate}" Foreground="{TemplateBinding Foreground}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                <Rectangle x:Name="FocusVisual" IsHitTestVisible="False" RadiusY="2" RadiusX="2" Stroke="Black" StrokeThickness="1" StrokeDashArray="1 2" Visibility="Collapsed"/>
                            </Grid>
                            <Grid x:Name="ItemsContainer" Grid.Row="1" Visibility="Collapsed">
                                <ItemsPresenter/>
                            </Grid>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type telerik:RadPanelBarItem}">
                        <Grid x:Name="RootElement">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisual"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisual"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="MouseOut">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisual"/>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="SelectionStates">
                                    <VisualState x:Name="Unselected"/>
                                    <VisualState x:Name="Selected">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectionVisual"/>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="ExpandStates">
                                    <VisualState x:Name="Expanded">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ItemsContainer">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <DoubleAnimation Duration="0:0:0.2" From="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ItemsContainer"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Collapsed"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Focused">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisual">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Unfocused">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisual">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Grid x:Name="HeaderRow" Background="{StaticResource BackgroundButton2}">
                                <Border x:Name="MouseOverVisual" BorderBrush="#FF989898" BorderThickness="1" CornerRadius="1" Opacity="0" Background="{StaticResource BackgroundButtonMouseOver2}" />
                                <Border x:Name="SelectionVisual" BorderBrush="#FF989898" BorderThickness="1" CornerRadius="1" Opacity="0" Background="{StaticResource BackgroundButtonSelected2}" />
                                <Border x:Name="DisabledVisual" BorderBrush="#FF989898" BorderThickness="1" CornerRadius="1" Opacity="0">
                                    <Border BorderBrush="#FFCDCDCD" BorderThickness="1" Background="#FFE0E0E0" CornerRadius="0"/>
                                </Border>
                                <ContentControl x:Name="Header" ContentTemplate="{TemplateBinding HeaderTemplate}" Foreground="{TemplateBinding Foreground}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                <Rectangle x:Name="FocusVisual" IsHitTestVisible="False" RadiusY="2" RadiusX="2" Stroke="#FFCDCDCD" StrokeThickness="1" StrokeDashArray="1 2" Visibility="Collapsed"/>
                            </Grid>
                            <Grid x:Name="ItemsContainer" Grid.Row="1" Visibility="Collapsed">
                                <ItemsPresenter/>
                            </Grid>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
            <Setter Property="SnapsToDevicePixels" Value="True"/>
            <Setter Property="ItemsPanel">
                <Setter.Value>
                    <ItemsPanelTemplate>
                        <telerik:PanelBarPanel IsItemsHost="True"/>
                    </ItemsPanelTemplate>
                </Setter.Value>
            </Setter>
 
            <Style.Triggers>
                <Trigger Property="Level" Value="1">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type telerik:RadPanelBarItem}">
                                <Grid x:Name="RootElement" SnapsToDevicePixels="True">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="*"/>
                                    </Grid.RowDefinitions>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="NormalVisual"/>
                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisual"/>
                                                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="arrow"/>
                                                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Header"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisual"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="MouseOut"/>
                                        </VisualStateGroup>
                                        <VisualStateGroup x:Name="SelectionStates">
                                            <VisualState x:Name="Unselected"/>
                                            <VisualState x:Name="Selected">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectVisual"/>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                        <VisualStateGroup x:Name="ExpandStates">
                                            <VisualState x:Name="Expanded">
                                                <Storyboard>
                                                    <!--<DoubleAnimation Duration="0" To="180" Storyboard.TargetProperty="Angle" Storyboard.TargetName="directionRotation"/>-->
                                                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ItemsContainer">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <Visibility>Visible</Visibility>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <DoubleAnimation Duration="0:0:0.2" From="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ItemsContainer"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Collapsed"/>
                                        </VisualStateGroup>
                                        <VisualStateGroup x:Name="FocusStates">
                                            <VisualState x:Name="Focused">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisual">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <Visibility>Visible</Visibility>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Unfocused">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisual">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <Visibility>Collapsed</Visibility>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Grid x:Name="HeaderRow" Height="30" Width="Auto">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="*"/>
                                            <ColumnDefinition Width="Auto"/>
                                        </Grid.ColumnDefinitions>
                                        <Border x:Name="NormalVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="5">
                                            <Border BorderBrush="#FF989898" BorderThickness="1" Background="{TemplateBinding Background}"/>
                                        </Border>
                                        <Border x:Name="MouseOverVisual" BorderBrush="#FFAEAEAE" BorderThickness="1" Grid.ColumnSpan="5" Opacity="0" Background="{StaticResource BackgroundButtonMouseOver2}">
                                            <Border BorderBrush="#FFAEAEAE" BorderThickness="1">
                                            </Border>
                                        </Border>
                                        <Border x:Name="SelectVisual" BorderThickness="1" Grid.ColumnSpan="5" Opacity="0" Background="{StaticResource BackgroundButtonSelected2}">
                                            <Border.BorderBrush>
                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                    <GradientStop Color="#FFD4D0C4"/>
                                                    <GradientStop Color="#FFB9B5AA" Offset="1"/>
                                                </LinearGradientBrush>
                                            </Border.BorderBrush>
                                            <Border BorderThickness="1">
                                                <Border.BorderBrush>
                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                        <GradientStop Color="#FFD4D0C4"/>
                                                        <GradientStop Color="#FFB9B5AA" Offset="0.126"/>
                                                    </LinearGradientBrush>
                                                </Border.BorderBrush>
                                            </Border>
                                        </Border>
                                        <Border x:Name="DisabledVisual" BorderBrush="#FF989898" BorderThickness="1" Grid.ColumnSpan="5" Opacity="0">
                                            <Border BorderBrush="Transparent" BorderThickness="1" Background="#FFE0E0E0"/>
                                        </Border>
                                        <Path x:Name="arrow" Grid.Column="5" Data="M1,1.5L4.5,5 8,1.5" HorizontalAlignment="Right" Margin="7,0" Opacity="1" RenderTransformOrigin="0.5,0.5" Stretch="None" Stroke="White" StrokeThickness="2" VerticalAlignment="Center">
                                            <Path.RenderTransform>
                                                <RotateTransform Angle="0"/>
                                            </Path.RenderTransform>
                                        </Path>
                                        <ContentControl x:Name="Header" Grid.ColumnSpan="4" Margin="8 0 0 0" ContentTemplate="{TemplateBinding HeaderTemplate}" Foreground="{TemplateBinding Foreground}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="Center"/>
                                        <Rectangle x:Name="FocusVisual" Grid.ColumnSpan="5" Grid.Column="0" IsHitTestVisible="False" Stroke="Black" StrokeThickness="1" StrokeDashArray="1 2" Visibility="Collapsed"/>
                                    </Grid>
                                    <Grid x:Name="ItemsContainer" Grid.Row="1" Visibility="Collapsed">
                                        <telerik:LayoutTransformControl x:Name="transformationRoot" IsTabStop="False">
                                            <ItemsPresenter/>
                                        </telerik:LayoutTransformControl>
                                    </Grid>
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Trigger>
            </Style.Triggers>
        </Style>
 
    </Window.Resources>
 
    <Grid Background="LightGray">
        <telerik:RadExpander ExpandDirection="Right" HorizontalAlignment="Left" VerticalAlignment="Top" Style="{StaticResource RadExpanderStyle}">
 
            <telerik:RadPanelBar Margin="0 0 5 5">
                <telerik:RadPanelBarItem Header="Vendas" Style="{StaticResource RadPanelBarItemStyle}">
                    <telerik:RadPanelBarItem Header="Cadastros" />
                    <telerik:RadPanelBarItem Header="Calculo de P" Tag="21"/>
                    <telerik:RadPanelBarItem Header="Calc Penden" Tag=""/>
                    <telerik:RadPanelBarItem Header="Relatorios"/>
                </telerik:RadPanelBarItem>
 
                <telerik:RadPanelBarItem Header="Producao" Style="{StaticResource RadPanelBarItemStyle}" >
                    <telerik:RadPanelBarItem Header="Cadastros" Tag="2" />
                    <telerik:RadPanelBarItem Header="Laudo" Tag="5" />
                    <telerik:RadPanelBarItem Header="Planejamento" Tag="4" />
                    <telerik:RadPanelBarItem Header="PCP" Tag="3"/>
                    <telerik:RadPanelBarItem Header="Relatorios"/>
                </telerik:RadPanelBarItem>
            </telerik:RadPanelBar>
        </telerik:RadExpander>
    </Grid>
</Window>

Ras Ran
Top achievements
Rank 2
Iron
Veteran
Iron
 answered on 10 Apr 2019
4 answers
139 views

I am using the savelayout and loadlayout functions to save and load dock layout. This is working as expected.

The issue I'm having is where I should put the loadlayout code in the page lifecycle. 

If I add the load function to the constructor as expected the layout is ignored and the default is used. If I add the load function to the contentrendered code the user see's the dock jerk from one layout to another. 

Ideally I don't want the user to see the move from default to loaded layouts.

Can you explain how I achieve this please?

Many thanks

R

Dilyan Traykov
Telerik team
 answered on 09 Apr 2019
1 answer
339 views

Hi guys, 

I'm trying to decrease the GanttView row height, I'm using the Material Theme and I'm able to do it.

 

I already set this style on my xaml without luck

 

<sys:Double x:Key="RowHeight">8</sys:Double>

                                    <Style TargetType="telerik:SimpleCellContainer" BasedOn="{StaticResource SimpleCellContainerStyle}">
                                        <Setter Property="MinHeight" Value="{StaticResource RowHeight}" />
                                    </Style>
                                    <Style TargetType="telerik:CellContainer" BasedOn="{StaticResource CellContainerStyle}">
                                        <Setter Property="MinHeight" Value="{StaticResource RowHeight}" />
                                    </Style>
                                    <Style TargetType="telerik:CellEditingContainer" BasedOn="{StaticResource CellEditingContainerStyle }">
                                        <Setter Property="MinHeight" Value="{StaticResource RowHeight}" />
                                    </Style>
                                    <Style TargetType="telerik:SimpleTreeCellContainer" BasedOn="{StaticResource SimpleTreeCellContainerStyle }">
                                        <Setter Property="MinHeight" Value="{StaticResource RowHeight}" />
                                    </Style>
                                    <Style TargetType="telerik:DragResizeSlotHighlightContainer" BasedOn="{StaticResource DragResizeSlotHighlightContainerStyle}">
                                        <Setter Property="MinHeight" Value="{StaticResource RowHeight}" />
                                    </Style>
                                    <Style TargetType="telerik:CellHighlightContainer" BasedOn="{StaticResource CellHighlightContainerStyle}">
                                        <Setter Property="MinHeight" Value="{StaticResource RowHeight}" />
                                    </Style>

 

Someone can help me?

 

Best regards

Enrico

Dilyan Traykov
Telerik team
 answered on 09 Apr 2019
1 answer
147 views

I'm struggling to style the MapCommandBar because I can't find the properties referred to in the Styling the MapCommandBar article e.g. MapButtonBackground. Where can I set that? It doesn't exist in the generated default MapCommandBar or RadMap style templates 

Thanks,

Simon

Vladimir Stoyanov
Telerik team
 answered on 09 Apr 2019
1 answer
287 views
I've been using the UI for WPF with the regular binaries and the StyleManager for a while.  Today I took a shot at switching to the NoXaml binaries.   Unfortunately my change has broken all of the custom styles I myself made for Telerik controls.  Specifically, the XAML parser blows up when it see me attempting to base my style on the default one like this:

<Style TargetType="{x:Type tk:RadRadioButton}"
   BasedOn="{StaticResource {x:Type tk:RadRadioButton}}">
    <Setter Property="CornerRadius" Value ="3"/>
</Style>


The "BasedOn" clause causes the problem.  I get the dreaded "Provide Value on StaticResourceHolder" error.  It would appear it cannot locate that default style for RadRadioButton on which I am trying to base my style.

Can you help me figure out further I need to do to make these styles work again?


I tried to follow the instructions here:

https://docs.telerik.com/devtools/WPF/styling-and-appearance/styling-apperance-setting-a-theme-overview

I removed all assembly references from the regular binaries and replaced them with references to the NoXaml equivalents.

Instead of copying the XAML files, I tried the approach that says to reference a theme from the /Binaries/NoXaml folder.

And since I am using the Windows8Touch, I m

https://docs.telerik.com/devtools/WPF/styling-and-appearance/themes-suite/common-styles-appearance-colorizing-metro-theme

And so I did this at the start of my application resources in App.xaml


<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <tk:Windows8ResourceDictionary/>
            <tk:Windows8TouchResourceDictionary/>



Am I missing something?
Dinko | Tech Support Engineer
Telerik team
 answered on 08 Apr 2019
4 answers
135 views

Hi there,

 

Somehow I need to get old parent and new parent of a task after reordering it, but I can't find any event for that purpose. Can anyone help me with that please?

 

Thanks,

Developer1992

Bahram
Top achievements
Rank 1
 answered on 06 Apr 2019
2 answers
298 views

Hello,

I have been examining the Telerik source code and notice several anti-patterns related to automation peers. For several controls, the automation peers have function overrides that return unhelpful strings. One example is the RadGridViewAutomationPeer GetHelpTextCore method returns "RadGridView". Because of this, it's impossible to set help text for individual grids in XAML which is the default behavior of the GridViewDataControlAutomationPeer. Even though the RadGridViewAutomationPeer can be inherited from and its GetHelpTextCore method modified, not all Telerik automation peers are overridable. GridViewCell and GridViewRow for example require internally scoped properties and can't be overridden.

Right now I am able to bypass these issues by making the changes to the source code and recompiling it, but this is not a long term sustainable solution. Does Telerik have any sort of road map available for addressing automation peer issues?

Bryan
Top achievements
Rank 1
 answered on 05 Apr 2019
5 answers
261 views

Hi,

I was trying to add a qr into a RadFixedDocument like this

RadBarcodeQR qr = new RadBarcodeQR();
qr.Mode = QRClassLibrary.Modes.CodeMode.Byte;
qr.Text = documentHistory.SerialId.ToString();
qr.Width = 88;
qr.Height = 88;
using (MemoryStream stream = new MemoryStream())
{
      Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(qr, stream, new PngBitmapEncoder());
 
      //RadFixedDocument
       document.InsertImage(stream, area);
}

 

I have the following error on this line: Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(qr, stream, new PngBitmapEncoder());

Parameter value must be greater then 0. ParameterName: pixelWidth
 
   in System.Windows.Media.Imaging.RenderTargetBitmap..ctor(Int32 pixelWidth, Int32 pixelHeight, Double dpiX, Double dpiY, PixelFormat pixelFormat)
   in Telerik.Windows.Media.Imaging.ExportHelper.GetBitmapSource(FrameworkElement element, Double dpiX, Double dpiY)
   in Telerik.Windows.Media.Imaging.ExportHelper.GetElementImage(FrameworkElement element)
   in Telerik.Windows.Media.Imaging.ImageExporter.Export(FrameworkElement element, Stream stream, BitmapEncoder encoder)
   in Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(FrameworkElement element, Stream stream, BitmapEncoder encoder)
   in MileClient.DocumentUserControl.ExportAndViewDocumentWithImageStamp(DocumentHistoryEntity documentHistory) in D:\MyClient\Source\Gui\Wpf\UserControls\DocumentUserControl.xaml.cs:riga 714
   in MileClient.DocumentUserControl.OpenDocumentHistoryButton_Click(Object sender, RoutedEventArgs e) in D:\MyClient\Source\Gui\Wpf\UserControls\DocumentUserControl.xaml.cs:riga 614
   in System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   in System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   in System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   in System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   in System.Windows.Controls.Primitives.ButtonBase.OnClick()
   in System.Windows.Controls.Button.OnClick()
   in System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   in System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
   in System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   in System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   in System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   in System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   in System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   in System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   in System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   in System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   in System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   in System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   in System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   in System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   in System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   in System.Windows.Input.InputManager.ProcessStagingArea()
   in System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   in System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   in System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   in System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   in System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   in MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   in MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   in System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   in System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
Lance | Senior Manager Technical Support
Telerik team
 answered on 05 Apr 2019
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?