Exception when removing Slider from its parent

6 posts, 1 answers
  1. Ruben Hakopian
    Ruben Hakopian avatar
    37 posts
    Member since:
    Nov 2009

    Posted 16 Sep 2010 Link to this post

    Hi,

    I have a slider with modified template. When I remove the slider from its parent I'm getting following exception. Is there a way to resolve
    it?

    Thank you,
    Ruben

    at Telerik.Windows.Controls.RadTickBar.LoadTemplate(Double tickValue) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP1\Sources\Development\Core\Controls\Slider\RadTickBar.cs:line 402
    at Telerik.Windows.Controls.RadTickBar.CreateTick(Double tickValue) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP1\Sources\Development\Core\Controls\Slider\RadTickBar.cs:line 352
    at Telerik.Windows.Controls.RadTickBar.DrawTicks() in c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP1\Sources\Development\Core\Controls\Slider\RadTickBar.cs:line 231
    at Telerik.Windows.Controls.RadTickBar.OnPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP1\Sources\Development\Core\Controls\Slider\RadTickBar.cs:line 315
    at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
    at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
    at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
    at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
    at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp)
    at System.Windows.StyleHelper.InvalidatePropertiesOnTemplateNode(DependencyObject container, FrameworkObject child, Int32 childIndex, FrugalStructList`1& childRecordFromChildIndex, Boolean isDetach, FrameworkElementFactory templateRoot)
    at System.Windows.StyleHelper.ClearTemplateChain(HybridDictionary[] instanceData, FrameworkElement feContainer, FrameworkContentElement fceContainer, List`1 templateChain, FrameworkTemplate oldFrameworkTemplate)
    at System.Windows.StyleHelper.ClearGeneratedSubTree(HybridDictionary[] instanceData, FrameworkElement feContainer, FrameworkContentElement fceContainer, FrameworkTemplate oldFrameworkTemplate)
    at System.Windows.StyleHelper.DoTemplateInvalidations(FrameworkElement feContainer, FrameworkTemplate oldFrameworkTemplate)
    at System.Windows.StyleHelper.UpdateTemplateCache(FrameworkElement fe, FrameworkTemplate oldTemplate, FrameworkTemplate newTemplate, DependencyProperty templateProperty)
    at System.Windows.Controls.Control.OnTemplateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
    at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
    at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
    at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
    at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
    at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp)
    at System.Windows.StyleHelper.InvalidateContainerDependents(DependencyObject container, FrugalStructList`1& exclusionContainerDependents, FrugalStructList`1& oldContainerDependents, FrugalStructList`1& newContainerDependents)
    at System.Windows.StyleHelper.DoStyleInvalidations(FrameworkElement fe, FrameworkContentElement fce, Style oldStyle, Style newStyle)
    at System.Windows.StyleHelper.UpdateStyleCache(FrameworkElement fe, FrameworkContentElement fce, Style oldStyle, Style newStyle, Style& styleCache)
    at System.Windows.FrameworkElement.OnStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
    at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
    at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
    at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
    at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
    at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp)
    at System.Windows.FrameworkElement.UpdateStyleProperty()
    at System.Windows.FrameworkElement.InvalidateTreeDependentProperties(TreeChangeInfo parentTreeState, Boolean isSelfInheritanceParent)
    at System.Windows.FrameworkElement.OnAncestorChangedInternal(TreeChangeInfo parentTreeState)
    at System.Windows.TreeWalkHelper.OnAncestorChanged(FrameworkElement fe, FrameworkContentElement fce, TreeChangeInfo info)
    at System.Windows.TreeWalkHelper.OnAncestorChanged(DependencyObject d, TreeChangeInfo info)
    at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
    at MS.Internal.PrePostDescendentsWalker`1._VisitNode(DependencyObject d)
    at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
    at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
    at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
    at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
    at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
    at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
    at MS.Internal.PrePostDescendentsWalker`1._VisitNode(DependencyObject d)
    at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
    at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
    at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
    at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
    at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
    at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
    at MS.Internal.PrePostDescendentsWalker`1._VisitNode(DependencyObject d)
    at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
    at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
    at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
    at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
    at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
    at System.Windows.DescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode)
    at MS.Internal.PrePostDescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode)
    at System.Windows.TreeWalkHelper.InvalidateOnTreeChange(FrameworkElement fe, FrameworkContentElement fce, DependencyObject parent, Boolean isAddOperation)
    at System.Windows.FrameworkElement.OnVisualParentChanged(DependencyObject oldParent)
    at System.Windows.Media.Visual.FireOnVisualParentChanged(DependencyObject oldParent)
    at System.Windows.Media.Visual.RemoveVisualChild(Visual child)
    at System.Windows.Media.VisualCollection.DisconnectChild(Int32 index)
    at System.Windows.Media.VisualCollection.RemoveRange(Int32 index, Int32 count)
    at System.Windows.Controls.UIElementCollection.RemoveRangeInternal(Int32 index, Int32 count)
    at System.Windows.Controls.Panel.removeChildren(GeneratorPosition pos, Int32 containerCount)
    at System.Windows.Controls.Panel.OnItemsChangedInternal(Object sender, ItemsChangedEventArgs args)
    at System.Windows.Controls.Panel.OnItemsChanged(Object sender, ItemsChangedEventArgs args)
    at System.Windows.Controls.ItemContainerGenerator.OnItemRemoved(Object item, Int32 itemIndex)
    at System.Windows.Controls.ItemContainerGenerator.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
    at System.Windows.Controls.ItemContainerGenerator.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
    at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
    at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
    at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
    at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
    at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
    at System.Windows.Controls.ItemCollection.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
    at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
    at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
    at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
    at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
    at MS.Internal.Controls.InnerItemCollectionView._RemoveAt(Int32 index, Int32 indexR, Object item)
    at MS.Internal.Controls.InnerItemCollectionView.RemoveAt(Int32 index)
    at System.Windows.Controls.ItemCollection.RemoveAt(Int32 removeIndex)
  2. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 21 Sep 2010 Link to this post

    Hello Ruben Hakopian,

     Can you create new support ticket and attach the modified ControlTemplate? This will help us with finding what is casing the problem. (if you don't mind you can also paste it here.) 

    Thank you for your cooperation.

    Best wishes,
    Miro Miroslavov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. Ruben Hakopian
    Ruben Hakopian avatar
    37 posts
    Member since:
    Nov 2009

    Posted 07 Oct 2010 Link to this post

    Hi Miroslav,

    This is the customization I made to the RadSlider.

    Thank you,
    Ruben.

    public class CustomSlider : RadSlider
    {
        static CustomSlider()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(CustomSlider), new FrameworkPropertyMetadata(typeof(CustomSlider)));
        }
     
        #region ThumbContentTemplate
     
        public DataTemplate ThumbContentTemplate
        {
            get { return (DataTemplate)GetValue(ThumbContentTemplateProperty); }
            set { SetValue(ThumbContentTemplateProperty, value); }
        }
     
        // Using a DependencyProperty as the backing store for ThumbContentTemplate.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty ThumbContentTemplateProperty =
            DependencyProperty.Register("ThumbContentTemplate", typeof(DataTemplate), typeof(CustomSlider), new PropertyMetadata(new DataTemplate()));
     
        #endregion
     
        #region SelectionStartThumbContentTemplate
     
        public DataTemplate SelectionStartThumbContentTemplate
        {
            get { return (DataTemplate)GetValue(SelectionStartThumbContentTemplateProperty); }
            set { SetValue(SelectionStartThumbContentTemplateProperty, value); }
        }
     
        // Using a DependencyProperty as the backing store for SelectionStartThumbContentTemplate.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty SelectionStartThumbContentTemplateProperty =
            DependencyProperty.Register("SelectionStartThumbContentTemplate", typeof(DataTemplate), typeof(CustomSlider), new PropertyMetadata(new DataTemplate()));
     
        #endregion
     
        #region SelectionEndThumbContentTemplate
     
        public DataTemplate SelectionEndThumbContentTemplate
        {
            get { return (DataTemplate)GetValue(SelectionEndThumbContentTemplateProperty); }
            set { SetValue(SelectionEndThumbContentTemplateProperty, value); }
        }
     
        // Using a DependencyProperty as the backing store for SelectionEndThumbContentTemplate.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty SelectionEndThumbContentTemplateProperty =
            DependencyProperty.Register("SelectionEndThumbContentTemplate", typeof(DataTemplate), typeof(CustomSlider), new PropertyMetadata(new DataTemplate()));
     
        #endregion
     
        #region IsValueValid
     
        public bool IsValueValid
        {
            get { return (bool)GetValue(IsValueValidProperty); }
            set { SetValue(IsValueValidProperty, value); }
        }
     
        // Using a DependencyProperty as the backing store for IsValueValid.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty IsValueValidProperty =
            DependencyProperty.Register("IsValueValid", typeof(bool), typeof(CustomSlider));
     
        #endregion
     
        #region IsStartValid
     
        public bool IsStartValid
        {
            get { return (bool)GetValue(IsStartValidProperty); }
            set { SetValue(IsStartValidProperty, value); }
        }
     
        // Using a DependencyProperty as the backing store for IsStartValid.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty IsStartValidProperty =
            DependencyProperty.Register("IsStartValid", typeof(bool), typeof(CustomSlider));
     
        #endregion
     
        #region IsEndValid
     
        public bool IsEndValid
        {
            get { return (bool)GetValue(IsEndValidProperty); }
            set { SetValue(IsEndValidProperty, value); }
        }
     
        // Using a DependencyProperty as the backing store for IsEndValid.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty IsEndValidProperty =
            DependencyProperty.Register("IsEndValid", typeof(bool), typeof(CustomSlider));
     
        #endregion
     
        public CustomSlider()
        {
            this.Loaded += new RoutedEventHandler(CustomSlider_Loaded);
            this.SizeChanged += RadSlider_SizeChanged;
     
            IsValueValid = true;
            IsStartValid = true;
            IsEndValid = true;
     
            var tickBinding = new MultiBinding();
            tickBinding.Converter = TickSnapConverterConverter.Instance;
            tickBinding.Bindings.Add(new Binding("Minimum") { Source = this });
            tickBinding.Bindings.Add(new Binding("Maximum") { Source = this });
            this.SetBinding(RadSlider.IsSnapToTickEnabledProperty, tickBinding);
        }
     
        void CustomSlider_Loaded(object sender, RoutedEventArgs e)
        {
            this.UpdateLayout();
        }
     
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();
             
            SubscribeToThumbEvent("HorizontalSingleThumb");
            SubscribeToThumbEvent("HorizontalRangeStartThumb");
            SubscribeToThumbEvent("HorizontalRangeEndThumb");
        }
     
        private void SubscribeToThumbEvent(string partName)
        {
            var thumb = this.Template.FindName(partName, this);
            if (thumb is Control)
            {
                (thumb as Control).SizeChanged += RadSlider_SizeChanged;
            }
        }
     
        public void RadSlider_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            this.UpdateLayout();
        }
     
     
        public class TickSnapConverterConverter : IMultiValueConverter
        {
            private static readonly TickSnapConverterConverter _instance = new TickSnapConverterConverter();
     
            public static TickSnapConverterConverter Instance
            {
                get { return TickSnapConverterConverter._instance; }
            }
     
            private TickSnapConverterConverter()
            {
            }
     
            public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
            {
                try
                {
                    var minimum = (double)values[0];
                    var maximum = (double)values[1];
                     
                    return Math.Abs(maximum - minimum) > 5;
                }
                catch
                {
                    return null;
                }
     
            }
     
            public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
            {
                throw new NotImplementedException();
            }
        }
     
    }

    <LinearGradientBrush x:Key="SliderNormalThumbBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFEBF3FF"/>
        <GradientStop Color="#FFCAE1FF" Offset="0.5"/>
        <GradientStop Color="#FFA1C5F2" Offset="0.5"/>
        <GradientStop Color="#FFD0F3FF" Offset="1"/>
    </LinearGradientBrush>
     
    <LinearGradientBrush x:Key="SliderInvalidThumbBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFEBF3FF"/>
        <GradientStop Color="#FFFF2A2A" Offset="0.5"/>
        <GradientStop Color="#FFFF552A" Offset="0.5"/>
        <GradientStop Color="#FFD0F3FF" Offset="1"/>
    </LinearGradientBrush>
     
    <Style TargetType="{x:Type localControls:CustomSlider}">
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="Orientation" Value="Horizontal"/>
        <Setter Property="IsEnabled" Value="True"/>
        <Setter Property="HandlesVisibility" Value="Collapsed"/>
        <Setter Property="IsMouseWheelEnabled" Value="True"/>
        <Setter Property="Background" Value="#FFE2F0FD"/>
        <Setter Property="BorderBrush" Value="#FF83A5D2"/>
        <Setter Property="Delay" Value="250"/>
        <Setter Property="RepeatInterval" Value="250"/>
        <Setter Property="StepAction" Value="ChangeRange"/>
        <Setter Property="ThumbVisibility" Value="Visible"/>
        <Setter Property="MinimumRangeSpan" Value="0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type localControls:CustomSlider}">
                    <Grid x:Name="LayoutRoot">
                        <Grid.Resources>
                            <DataTemplate x:Key="VerticalTickTemplate">
                                <Grid x:Name="RootElement" ToolTip="{Binding}">
                                    <Rectangle Fill="#FF3C6AA3" Height="1" Width="5"/>
                                </Grid>
                            </DataTemplate>
                            <DataTemplate x:Key="HorizontalTickTemplate">
                                <Grid x:Name="RootElement" ToolTip="{Binding}">
                                    <Rectangle Fill="#FF3C6AA3" Height="5" Width="1"/>
                                </Grid>
                            </DataTemplate>
                        </Grid.Resources>
                        <Grid>
                            <Grid x:Name="HorizontalTemplate">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <telerik:RadTickBar x:Name="TopTickBar" Grid.Column="1" EnableSideTicks="{TemplateBinding EnableSideTicks}" IsTabStop="False" IsDirectionReversed="{TemplateBinding IsDirectionReversed}" Maximum="{TemplateBinding Maximum}" Minimum="{TemplateBinding Minimum}" MinHeight="6" Orientation="{TemplateBinding Orientation}" Placement="Top" Ticks="{TemplateBinding Ticks}" TickTemplateSelector="{TemplateBinding TickTemplateSelector}" TickTemplate="{TemplateBinding TickTemplate}" TickFrequency="{TemplateBinding TickFrequency}">
                                    <telerik:RadTickBar.Template>
                                        <ControlTemplate TargetType="{x:Type telerik:RadTickBar}">
                                            <Canvas x:Name="LayoutRoot" Background="Transparent"/>
                                        </ControlTemplate>
                                    </telerik:RadTickBar.Template>
                                </telerik:RadTickBar>
                                <telerik:RadTickBar x:Name="BottomTickBar" Grid.Column="1" EnableSideTicks="{TemplateBinding EnableSideTicks}" IsTabStop="False" IsDirectionReversed="{TemplateBinding IsDirectionReversed}" Maximum="{TemplateBinding Maximum}" Minimum="{TemplateBinding Minimum}" MinHeight="6" Orientation="{TemplateBinding Orientation}" Placement="Bottom" Grid.Row="2" Ticks="{TemplateBinding Ticks}" TickTemplateSelector="{TemplateBinding TickTemplateSelector}" TickTemplate="{TemplateBinding TickTemplate}" TickFrequency="{TemplateBinding TickFrequency}">
                                    <telerik:RadTickBar.Template>
                                        <ControlTemplate TargetType="{x:Type telerik:RadTickBar}">
                                            <Canvas x:Name="LayoutRoot" Background="Transparent"/>
                                        </ControlTemplate>
                                    </telerik:RadTickBar.Template>
                                </telerik:RadTickBar>
                                <Border x:Name="Track" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,1,1,0" Grid.Column="1" CornerRadius="0" Height="6" Grid.Row="1" VerticalAlignment="Center">
                                    <Border BorderBrush="White" BorderThickness="1" Background="{TemplateBinding Background}" CornerRadius="0"/>
                                </Border>
                                <Grid x:Name="HorizontalSingleThumbTemplate" Grid.Column="1" MinHeight="18" Grid.Row="1">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <Rectangle x:Name="HorizontalSingleLargeDecrease" Cursor="Hand" Fill="Transparent" Opacity="0" VerticalAlignment="Stretch"/>
                                    <Thumb x:Name="HorizontalSingleThumb" Grid.Column="1" MinHeight="18" IsEnabled="{TemplateBinding IsEnabled}" Visibility="{TemplateBinding ThumbVisibility}" VerticalAlignment="Center" MinWidth="8" >
                                        <Thumb.Template>
                                            <ControlTemplate TargetType="{x:Type Thumb}">
                                                <Grid>
                                                    <Border x:Name="Border" BorderBrush="#FF83A5D2" BorderThickness="1" CornerRadius="1"
                                                            Background="{StaticResource SliderNormalThumbBackground}">
                                                        <Border x:Name="InnerBorder" BorderBrush="White" BorderThickness="1" CornerRadius="0">
                                                            <ContentControl Margin="2,0,2,0"
                                                                            Content="{Binding}"
                                                                            ContentTemplate="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type localControls:CustomSlider}}, Path=ThumbContentTemplate}" />
                                                        </Border>
                                                    </Border>
                                                </Grid>
                                                <ControlTemplate.Triggers>
                                                    <Trigger Property="IsMouseOver" Value="True">
                                                        <Setter Property="BorderBrush" TargetName="Border" Value="#FFFFC92B"/>
                                                        <Setter Property="BorderBrush" TargetName="InnerBorder" Value="White"/>
                                                        <Setter Property="Background" TargetName="Border">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                    <GradientStop Color="#FFFFFBDA" Offset="0"/>
                                                                    <GradientStop Color="#FFFEEBAE" Offset="0.5"/>
                                                                    <GradientStop Color="#FFFFD25A" Offset="0.5"/>
                                                                    <GradientStop Color="#FFFFFBA3" Offset="1"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </Trigger>
                                                    <Trigger Property="IsEnabled" Value="False">
                                                        <Setter Property="BorderBrush" TargetName="Border" Value="#FF9BB0CD"/>
                                                        <Setter Property="BorderBrush" TargetName="InnerBorder" Value="Transparent"/>
                                                        <Setter Property="Background" TargetName="Border" Value="#FFE2F0FD"/>
                                                    </Trigger>
                                                    <Trigger Property="IsDragging" Value="True">
                                                        <Setter Property="BorderBrush" TargetName="Border">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                    <GradientStop Color="#FF616161" Offset="0"/>
                                                                    <GradientStop Color="#FF989898" Offset="1"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                        <Setter Property="BorderBrush" TargetName="InnerBorder">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                    <GradientStop Color="#FFB69A78"/>
                                                                    <GradientStop Color="#FFFFE17A" Offset="0.126"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                        <Setter Property="Background" TargetName="Border">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                    <GradientStop Color="#FFFFDCAB" Offset="0"/>
                                                                    <GradientStop Color="#FFFFD18F" Offset="0.5"/>
                                                                    <GradientStop Color="#FFFE9227" Offset="0.5"/>
                                                                    <GradientStop Color="#FFFFBA74" Offset="0"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </Trigger>
                                                    <DataTrigger Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type localControls:CustomSlider}}, Path=IsValueValid}" Value="False">
                                                        <DataTrigger.Setters>
                                                            <Setter Property="Background" TargetName="Border" Value="{StaticResource SliderInvalidThumbBackground}" />
                                                        </DataTrigger.Setters>
                                                    </DataTrigger>
                                                </ControlTemplate.Triggers>
                                            </ControlTemplate>
                                        </Thumb.Template>
                                    </Thumb>
                                    <Rectangle x:Name="HorizontalSingleLargeIncrease" Cursor="Hand" Grid.Column="2" Fill="Transparent" Opacity="0" VerticalAlignment="Stretch"/>
                                </Grid>
                                <Grid x:Name="HorizontalRangeTemplate" Grid.Column="1" MinHeight="18" Grid.Row="1">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="*"/>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="Auto"/>
                                    </Grid.ColumnDefinitions>
                                    <Rectangle x:Name="HorizontalRangeLargeDecrease" Cursor="Hand" Grid.Column="0" Fill="Transparent" Opacity="0"/>
                                    <Thumb x:Name="HorizontalRangeStartThumb" Grid.Column="1" MinHeight="18" IsEnabled="{TemplateBinding IsEnabled}" Visibility="{TemplateBinding ThumbVisibility}" VerticalAlignment="Center" MinWidth="8" >
                                        <Thumb.Template>
                                            <ControlTemplate TargetType="{x:Type Thumb}">
                                                <Grid>
                                                    <Border x:Name="Border" BorderBrush="#FF83A5D2" BorderThickness="1" CornerRadius="1"
                                                            Background="{StaticResource SliderNormalThumbBackground}">
                                                        <Border x:Name="InnerBorder" BorderBrush="White" BorderThickness="1" CornerRadius="0">
                                                            <ContentControl Margin="2,0,2,0"
                                                                            Content="{Binding}"
                                                                            ContentTemplate="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type localControls:CustomSlider}}, Path=SelectionStartThumbContentTemplate}" />
                                                        </Border>
                                                    </Border>
                                                </Grid>
                                                <ControlTemplate.Triggers>
                                                    <Trigger Property="IsMouseOver" Value="True">
                                                        <Setter Property="BorderBrush" TargetName="Border" Value="#FFFFC92B"/>
                                                        <Setter Property="BorderBrush" TargetName="InnerBorder" Value="White"/>
                                                        <Setter Property="Background" TargetName="Border">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                    <GradientStop Color="#FFFFFBDA" Offset="0"/>
                                                                    <GradientStop Color="#FFFEEBAE" Offset="0.5"/>
                                                                    <GradientStop Color="#FFFFD25A" Offset="0.5"/>
                                                                    <GradientStop Color="#FFFFFBA3" Offset="1"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </Trigger>
                                                    <Trigger Property="IsEnabled" Value="False">
                                                        <Setter Property="BorderBrush" TargetName="Border" Value="#FF9BB0CD"/>
                                                        <Setter Property="BorderBrush" TargetName="InnerBorder" Value="Transparent"/>
                                                        <Setter Property="Background" TargetName="Border" Value="#FFE2F0FD"/>
                                                    </Trigger>
                                                    <Trigger Property="IsDragging" Value="True">
                                                        <Setter Property="BorderBrush" TargetName="Border">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                    <GradientStop Color="#FF616161" Offset="0"/>
                                                                    <GradientStop Color="#FF989898" Offset="1"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                        <Setter Property="BorderBrush" TargetName="InnerBorder">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                    <GradientStop Color="#FFB69A78"/>
                                                                    <GradientStop Color="#FFFFE17A" Offset="0.126"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                        <Setter Property="Background" TargetName="Border">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                    <GradientStop Color="#FFFFDCAB" Offset="0"/>
                                                                    <GradientStop Color="#FFFFD18F" Offset="0.5"/>
                                                                    <GradientStop Color="#FFFE9227" Offset="0.5"/>
                                                                    <GradientStop Color="#FFFFBA74" Offset="0"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </Trigger>
                                                    <DataTrigger Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type localControls:CustomSlider}}, Path=IsStartValid}" Value="False">
                                                        <DataTrigger.Setters>
                                                            <Setter Property="Background" TargetName="Border" Value="{StaticResource SliderInvalidThumbBackground}" />
                                                        </DataTrigger.Setters>
                                                    </DataTrigger>
                                                </ControlTemplate.Triggers>
                                            </ControlTemplate>
                                        </Thumb.Template>
                                    </Thumb>
                                    <Thumb x:Name="HorizontalRangeMiddleThumb" Grid.Column="2" IsEnabled="{TemplateBinding IsEnabled}" VerticalAlignment="Center">
                                        <Thumb.Template>
                                            <ControlTemplate TargetType="{x:Type Thumb}">
                                                <Grid>
                                                    <Border x:Name="border" BorderBrush="Transparent" BorderThickness="0" Height="4" Opacity="1">
                                                        <Border.Background>
                                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                <GradientStop Color="#FFFFFBA3" Offset="1"/>
                                                                <GradientStop Color="#FFFFFBDA" Offset="0"/>
                                                                <GradientStop Color="#FFFFC92B" Offset="0.51"/>
                                                                <GradientStop Color="#FFFEEBAE" Offset="0.5"/>
                                                            </LinearGradientBrush>
                                                        </Border.Background>
                                                    </Border>
                                                </Grid>
                                                <ControlTemplate.Triggers>
                                                    <Trigger Property="IsMouseOver" Value="True">
                                                        <Setter Property="Background" TargetName="border">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                    <GradientStop Color="#FFFFD74E" Offset="0.996"/>
                                                                    <GradientStop Color="#FFFFDCAB"/>
                                                                    <GradientStop Color="#FFFE9227" Offset="0.51"/>
                                                                    <GradientStop Color="#FFFFD18F" Offset="0.5"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </Trigger>
                                                    <EventTrigger RoutedEvent="Thumb.DragStarted"/>
                                                </ControlTemplate.Triggers>
                                            </ControlTemplate>
                                        </Thumb.Template>
                                    </Thumb>
                                    <Thumb x:Name="HorizontalRangeEndThumb" Grid.Column="3" MinHeight="18" IsEnabled="{TemplateBinding IsEnabled}" Visibility="{TemplateBinding ThumbVisibility}" VerticalAlignment="Center" MinWidth="8" >
                                        <Thumb.Template>
                                            <ControlTemplate TargetType="{x:Type Thumb}">
                                                <Grid>
                                                    <Border x:Name="Border" BorderBrush="#FF83A5D2" BorderThickness="1" CornerRadius="1"
                                                            Background="{StaticResource SliderNormalThumbBackground}">
                                                        <Border x:Name="InnerBorder" BorderBrush="White" BorderThickness="1" CornerRadius="0">
                                                            <ContentControl Margin="2,0,2,0"
                                                                            Content="{Binding}"
                                                                            ContentTemplate="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type localControls:CustomSlider}}, Path=SelectionEndThumbContentTemplate}" />
                                                        </Border>
                                                    </Border>
                                                </Grid>
                                                <ControlTemplate.Triggers>
                                                    <Trigger Property="IsMouseOver" Value="True">
                                                        <Setter Property="BorderBrush" TargetName="Border" Value="#FFFFC92B"/>
                                                        <Setter Property="BorderBrush" TargetName="InnerBorder" Value="White"/>
                                                        <Setter Property="Background" TargetName="Border">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                    <GradientStop Color="#FFFFFBDA" Offset="0"/>
                                                                    <GradientStop Color="#FFFEEBAE" Offset="0.5"/>
                                                                    <GradientStop Color="#FFFFD25A" Offset="0.5"/>
                                                                    <GradientStop Color="#FFFFFBA3" Offset="1"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </Trigger>
                                                    <Trigger Property="IsEnabled" Value="False">
                                                        <Setter Property="BorderBrush" TargetName="Border" Value="#FF9BB0CD"/>
                                                        <Setter Property="BorderBrush" TargetName="InnerBorder" Value="Transparent"/>
                                                        <Setter Property="Background" TargetName="Border" Value="#FFE2F0FD"/>
                                                    </Trigger>
                                                    <Trigger Property="IsDragging" Value="True">
                                                        <Setter Property="BorderBrush" TargetName="Border">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                    <GradientStop Color="#FF616161" Offset="0"/>
                                                                    <GradientStop Color="#FF989898" Offset="1"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                        <Setter Property="BorderBrush" TargetName="InnerBorder">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                    <GradientStop Color="#FFB69A78"/>
                                                                    <GradientStop Color="#FFFFE17A" Offset="0.126"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                        <Setter Property="Background" TargetName="Border">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                    <GradientStop Color="#FFFFDCAB" Offset="0"/>
                                                                    <GradientStop Color="#FFFFD18F" Offset="0.5"/>
                                                                    <GradientStop Color="#FFFE9227" Offset="0.5"/>
                                                                    <GradientStop Color="#FFFFBA74" Offset="0"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </Trigger>
                                                    <DataTrigger Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type localControls:CustomSlider}}, Path=IsEndValid}" Value="False">
                                                        <DataTrigger.Setters>
                                                            <Setter Property="Background" TargetName="Border" Value="{StaticResource SliderInvalidThumbBackground}" />
                                                        </DataTrigger.Setters>
                                                    </DataTrigger>
                                                </ControlTemplate.Triggers>
                                            </ControlTemplate>
                                        </Thumb.Template>
                                    </Thumb>
                                    <Rectangle x:Name="HorizontalRangeLargeIncrease" Cursor="Hand" Grid.Column="4" Fill="Transparent" Opacity="0"/>
                                </Grid>
                                <RepeatButton x:Name="HorizontalDecreaseHandle" Delay="{TemplateBinding Delay}" IsEnabled="{TemplateBinding IsEnabled}" Interval="{TemplateBinding RepeatInterval}" Margin="0,0,2,0" Grid.Row="1" Visibility="{TemplateBinding HandlesVisibility}">
                                    <RepeatButton.Style>
                                        <Style TargetType="{x:Type RepeatButton}">
                                            <Setter Property="IsTabStop" Value="False"/>
                                            <Setter Property="Cursor" Value="Hand"/>
                                            <Setter Property="Template">
                                                <Setter.Value>
                                                    <ControlTemplate TargetType="{x:Type RepeatButton}">
                                                        <Grid x:Name="Root" Height="18" Width="18">
                                                            <Border x:Name="Border" BorderBrush="#FF83A5D2" BorderThickness="1" CornerRadius="1">
                                                                <Border.Background>
                                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                        <GradientStop Color="#FFEBF3FF"/>
                                                                        <GradientStop Color="#FFD0F3FF" Offset="1"/>
                                                                        <GradientStop Color="#FFA1C5F2" Offset="0.43"/>
                                                                        <GradientStop Color="#FFCAE1FF" Offset="0.42"/>
                                                                    </LinearGradientBrush>
                                                                </Border.Background>
                                                                <Border x:Name="InnerBorder" BorderBrush="White" BorderThickness="1" CornerRadius="0"/>
                                                            </Border>
                                                            <Telerik_Windows_Controls_Chromes:ButtonChrome CornerRadius="1" RenderNormal="False" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" RenderFocused="{TemplateBinding IsFocused}" RenderEnabled="{TemplateBinding IsEnabled}">
                                                                <telerik:StyleManager.Theme>
                                                                    <telerik:Office_BlueTheme/>
                                                                </telerik:StyleManager.Theme>
                                                            </Telerik_Windows_Controls_Chromes:ButtonChrome>
                                                            <Path x:Name="Path" Data="M3,0L4,0 4,1 4,2 4,3 4,4 4,5 4,6 4,7 3,7 3,6 2,6 2,5 1,5 1,4 0,4 0,3 1,3 1,2 2,2 2,1 3,1z" Fill="#FF3C6AA3" HorizontalAlignment="Center" Height="7" RenderTransformOrigin="0.5,0.5" Stretch="Fill" VerticalAlignment="Center" Width="4"/>
                                                        </Grid>
                                                        <ControlTemplate.Triggers>
                                                            <Trigger Property="IsMouseOver" Value="True">
                                                                <Setter Property="Fill" TargetName="Path" Value="#FF3C6AA3"/>
                                                            </Trigger>
                                                            <Trigger Property="IsPressed" Value="True">
                                                                <Setter Property="Fill" TargetName="Path" Value="Black"/>
                                                            </Trigger>
                                                            <Trigger Property="IsEnabled" Value="False">
                                                                <Setter Property="Fill" TargetName="Path" Value="#FF8D8D8D"/>
                                                            </Trigger>
                                                        </ControlTemplate.Triggers>
                                                    </ControlTemplate>
                                                </Setter.Value>
                                            </Setter>
                                        </Style>
                                    </RepeatButton.Style>
                                </RepeatButton>
                                <RepeatButton x:Name="HorizontalIncreaseHandle" Grid.Column="2" Delay="{TemplateBinding Delay}" IsEnabled="{TemplateBinding IsEnabled}" Interval="{TemplateBinding RepeatInterval}" Margin="2,0,0,0" Grid.Row="1" RenderTransformOrigin="0.5,0.5" Visibility="{TemplateBinding HandlesVisibility}">
                                    <RepeatButton.RenderTransform>
                                        <ScaleTransform ScaleY="1" ScaleX="-1"/>
                                    </RepeatButton.RenderTransform>
                                    <RepeatButton.Style>
                                        <Style TargetType="{x:Type RepeatButton}">
                                            <Setter Property="IsTabStop" Value="False"/>
                                            <Setter Property="Cursor" Value="Hand"/>
                                            <Setter Property="Template">
                                                <Setter.Value>
                                                    <ControlTemplate TargetType="{x:Type RepeatButton}">
                                                        <Grid x:Name="Root" Height="18" Width="18">
                                                            <Border x:Name="Border" BorderBrush="#FF83A5D2" BorderThickness="1" CornerRadius="1">
                                                                <Border.Background>
                                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                        <GradientStop Color="#FFEBF3FF"/>
                                                                        <GradientStop Color="#FFD0F3FF" Offset="1"/>
                                                                        <GradientStop Color="#FFA1C5F2" Offset="0.43"/>
                                                                        <GradientStop Color="#FFCAE1FF" Offset="0.42"/>
                                                                    </LinearGradientBrush>
                                                                </Border.Background>
                                                                <Border x:Name="InnerBorder" BorderBrush="White" BorderThickness="1" CornerRadius="0"/>
                                                            </Border>
                                                            <Telerik_Windows_Controls_Chromes:ButtonChrome CornerRadius="1" RenderNormal="False" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" RenderFocused="{TemplateBinding IsFocused}" RenderEnabled="{TemplateBinding IsEnabled}">
                                                                <telerik:StyleManager.Theme>
                                                                    <telerik:Office_BlueTheme/>
                                                                </telerik:StyleManager.Theme>
                                                            </Telerik_Windows_Controls_Chromes:ButtonChrome>
                                                            <Path x:Name="Path" Data="M3,0L4,0 4,1 4,2 4,3 4,4 4,5 4,6 4,7 3,7 3,6 2,6 2,5 1,5 1,4 0,4 0,3 1,3 1,2 2,2 2,1 3,1z" Fill="#FF3C6AA3" HorizontalAlignment="Center" Height="7" RenderTransformOrigin="0.5,0.5" Stretch="Fill" VerticalAlignment="Center" Width="4"/>
                                                        </Grid>
                                                        <ControlTemplate.Triggers>
                                                            <Trigger Property="IsMouseOver" Value="True">
                                                                <Setter Property="Fill" TargetName="Path" Value="#FF3C6AA3"/>
                                                            </Trigger>
                                                            <Trigger Property="IsPressed" Value="True">
                                                                <Setter Property="Fill" TargetName="Path" Value="Black"/>
                                                            </Trigger>
                                                            <Trigger Property="IsEnabled" Value="False">
                                                                <Setter Property="Fill" TargetName="Path" Value="#FF8D8D8D"/>
                                                            </Trigger>
                                                        </ControlTemplate.Triggers>
                                                    </ControlTemplate>
                                                </Setter.Value>
                                            </Setter>
                                        </Style>
                                    </RepeatButton.Style>
                                </RepeatButton>
                            </Grid>
                            <Grid x:Name="VerticalTemplate">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="*"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <telerik:RadTickBar x:Name="LeftTickBar" Grid.Column="0" EnableSideTicks="{TemplateBinding EnableSideTicks}" IsTabStop="False" IsDirectionReversed="{TemplateBinding IsDirectionReversed}" Maximum="{TemplateBinding Maximum}" MinWidth="6" Minimum="{TemplateBinding Minimum}" Orientation="{TemplateBinding Orientation}" Placement="Left" Grid.Row="1" Ticks="{TemplateBinding Ticks}" TickTemplateSelector="{TemplateBinding TickTemplateSelector}" TickTemplate="{TemplateBinding TickTemplate}" TickFrequency="{TemplateBinding TickFrequency}">
                                    <telerik:RadTickBar.Template>
                                        <ControlTemplate TargetType="{x:Type telerik:RadTickBar}">
                                            <Canvas x:Name="LayoutRoot" Background="Transparent"/>
                                        </ControlTemplate>
                                    </telerik:RadTickBar.Template>
                                </telerik:RadTickBar>
                                <telerik:RadTickBar x:Name="RightTickBar" Grid.Column="2" EnableSideTicks="{TemplateBinding EnableSideTicks}" IsTabStop="False" IsDirectionReversed="{TemplateBinding IsDirectionReversed}" Maximum="{TemplateBinding Maximum}" MinWidth="6" Minimum="{TemplateBinding Minimum}" Orientation="{TemplateBinding Orientation}" Placement="Right" Grid.Row="1" Ticks="{TemplateBinding Ticks}" TickTemplateSelector="{TemplateBinding TickTemplateSelector}" TickTemplate="{TemplateBinding TickTemplate}" TickFrequency="{TemplateBinding TickFrequency}">
                                    <telerik:RadTickBar.Template>
                                        <ControlTemplate TargetType="{x:Type telerik:RadTickBar}">
                                            <Canvas x:Name="LayoutRoot" Background="Transparent"/>
                                        </ControlTemplate>
                                    </telerik:RadTickBar.Template>
                                </telerik:RadTickBar>
                                <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,1,1,1" Grid.Column="1" CornerRadius="0" HorizontalAlignment="Center" Grid.Row="1" Width="6">
                                    <Border BorderBrush="White" BorderThickness="1" Background="{TemplateBinding Background}" CornerRadius="0"/>
                                </Border>
                                <Grid x:Name="VerticalSingleThumbTemplate" Grid.Column="1" Grid.Row="1" MinWidth="18">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="*"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>
                                    <Rectangle x:Name="VerticalSingleLargeDecrease" Cursor="Hand" Fill="Transparent" HorizontalAlignment="Stretch" Opacity="0" Grid.Row="2"/>
                                    <Thumb x:Name="VerticalSingleThumb" HorizontalAlignment="Right" MinHeight="8" IsEnabled="{TemplateBinding IsEnabled}" Grid.Row="1" Visibility="{TemplateBinding ThumbVisibility}" MinWidth="18" DataContext="{Binding Path=Value}">
                                        <Thumb.Template>
                                            <ControlTemplate TargetType="{x:Type Thumb}">
                                                <Grid>
                                                    <Border x:Name="Border" BorderBrush="#FF83A5D2" BorderThickness="1" CornerRadius="1">
                                                        <Border.Background>
                                                            <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                                                <GradientStop Color="#FFEBF3FF"/>
                                                                <GradientStop Color="#FFD0F3FF" Offset="1"/>
                                                                <GradientStop Color="#FFA1C5F2" Offset="0.43"/>
                                                                <GradientStop Color="#FFCAE1FF" Offset="0.42"/>
                                                            </LinearGradientBrush>
                                                        </Border.Background>
                                                        <Border x:Name="InnerBorder" BorderBrush="White" BorderThickness="1" CornerRadius="0">
                                                            <ContentControl Margin="2,0,2,0"
                                                                            Content="{Binding}"
                                                                            ContentTemplate="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type localControls:CustomSlider}}, Path=ThumbContentTemplate}" />
                                                        </Border>
                                                    </Border>
                                                </Grid>
                                                <ControlTemplate.Triggers>
                                                    <Trigger Property="IsMouseOver" Value="True">
                                                        <Setter Property="BorderBrush" TargetName="Border" Value="#FFFFC92B"/>
                                                        <Setter Property="BorderBrush" TargetName="InnerBorder" Value="White"/>
                                                        <Setter Property="Background" TargetName="Border">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                                                    <GradientStop Color="#FFFFFBA3" Offset="1"/>
                                                                    <GradientStop Color="#FFFFFBDA" Offset="0"/>
                                                                    <GradientStop Color="#FFFFD25A" Offset="0.43"/>
                                                                    <GradientStop Color="#FFFEEBAE" Offset="0.42"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </Trigger>
                                                    <Trigger Property="IsEnabled" Value="False">
                                                        <Setter Property="BorderBrush" TargetName="Border" Value="#FF83A5D2"/>
                                                        <Setter Property="BorderBrush" TargetName="InnerBorder" Value="Transparent"/>
                                                        <Setter Property="Background" TargetName="Border" Value="#FFE2F0FD"/>
                                                    </Trigger>
                                                    <Trigger Property="IsDragging" Value="True">
                                                        <Setter Property="BorderBrush" TargetName="Border">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                                                    <GradientStop Color="#FF616161" Offset="0"/>
                                                                    <GradientStop Color="#FF989898" Offset="1"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                        <Setter Property="BorderBrush" TargetName="InnerBorder">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                                                    <GradientStop Color="#FFB69A78"/>
                                                                    <GradientStop Color="#FFFFE17A" Offset="0.126"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                        <Setter Property="Background" TargetName="Border">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                                                    <GradientStop Color="#FFFFD74E" Offset="0.996"/>
                                                                    <GradientStop Color="#FFFFDCAB" Offset="0.17"/>
                                                                    <GradientStop Color="#FFFE9227" Offset="0.57"/>
                                                                    <GradientStop Color="#FFFFD18F" Offset="0.56"/>
                                                                    <GradientStop Color="#FFFFBA74" Offset="0"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </Trigger>
                                                </ControlTemplate.Triggers>
                                            </ControlTemplate>
                                        </Thumb.Template>
                                    </Thumb>
                                    <Rectangle x:Name="VerticalSingleLargeIncrease" Cursor="Hand" Fill="Transparent" HorizontalAlignment="Stretch" Opacity="0" Grid.Row="0"/>
                                </Grid>
                                <Grid x:Name="VerticalRangeTemplate" Grid.Column="1" Grid.Row="1" Width="18">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="*"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>
                                    <Rectangle x:Name="VerticalRangeLargeDecrease" Cursor="Hand" Fill="Transparent" Opacity="0" Grid.Row="4"/>
                                    <Thumb x:Name="VerticalRangeStartThumb" HorizontalAlignment="Center" Height="8" IsEnabled="{TemplateBinding IsEnabled}" Grid.Row="3" Visibility="{TemplateBinding ThumbVisibility}" Width="18">
                                        <Thumb.Template>
                                            <ControlTemplate TargetType="{x:Type Thumb}">
                                                <Grid>
                                                    <Border x:Name="Border" BorderBrush="#FF83A5D2" BorderThickness="1" CornerRadius="1">
                                                        <Border.Background>
                                                            <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                                                <GradientStop Color="#FFEBF3FF"/>
                                                                <GradientStop Color="#FFD0F3FF" Offset="1"/>
                                                                <GradientStop Color="#FFA1C5F2" Offset="0.43"/>
                                                                <GradientStop Color="#FFCAE1FF" Offset="0.42"/>
                                                            </LinearGradientBrush>
                                                        </Border.Background>
                                                        <Border x:Name="InnerBorder" BorderBrush="White" BorderThickness="1" CornerRadius="0"/>
                                                    </Border>
                                                </Grid>
                                                <ControlTemplate.Triggers>
                                                    <Trigger Property="IsMouseOver" Value="True">
                                                        <Setter Property="BorderBrush" TargetName="Border" Value="#FFFFC92B"/>
                                                        <Setter Property="BorderBrush" TargetName="InnerBorder" Value="White"/>
                                                        <Setter Property="Background" TargetName="Border">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                                                    <GradientStop Color="#FFFFFBA3" Offset="1"/>
                                                                    <GradientStop Color="#FFFFFBDA" Offset="0"/>
                                                                    <GradientStop Color="#FFFFD25A" Offset="0.43"/>
                                                                    <GradientStop Color="#FFFEEBAE" Offset="0.42"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </Trigger>
                                                    <Trigger Property="IsEnabled" Value="False">
                                                        <Setter Property="BorderBrush" TargetName="Border" Value="#FF83A5D2"/>
                                                        <Setter Property="BorderBrush" TargetName="InnerBorder" Value="Transparent"/>
                                                        <Setter Property="Background" TargetName="Border" Value="#FFE2F0FD"/>
                                                    </Trigger>
                                                    <Trigger Property="IsDragging" Value="True">
                                                        <Setter Property="BorderBrush" TargetName="Border">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                                                    <GradientStop Color="#FF616161" Offset="0"/>
                                                                    <GradientStop Color="#FF989898" Offset="1"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                        <Setter Property="BorderBrush" TargetName="InnerBorder">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                                                    <GradientStop Color="#FFB69A78"/>
                                                                    <GradientStop Color="#FFFFE17A" Offset="0.126"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                        <Setter Property="Background" TargetName="Border">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                                                    <GradientStop Color="#FFFFD74E" Offset="0.996"/>
                                                                    <GradientStop Color="#FFFFDCAB" Offset="0.17"/>
                                                                    <GradientStop Color="#FFFE9227" Offset="0.57"/>
                                                                    <GradientStop Color="#FFFFD18F" Offset="0.56"/>
                                                                    <GradientStop Color="#FFFFBA74" Offset="0"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </Trigger>
                                                </ControlTemplate.Triggers>
                                            </ControlTemplate>
                                        </Thumb.Template>
                                    </Thumb>
                                    <Thumb x:Name="VerticalRangeMiddleThumb" HorizontalAlignment="Center" IsEnabled="{TemplateBinding IsEnabled}" Grid.Row="2">
                                        <Thumb.Template>
                                            <ControlTemplate TargetType="{x:Type Thumb}">
                                                <Grid>
                                                    <Border x:Name="border" BorderBrush="Transparent" BorderThickness="0" Opacity="1" Width="4">
                                                        <Border.Background>
                                                            <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                                                <GradientStop Color="#FFFFFBA3" Offset="0"/>
                                                                <GradientStop Color="#FFFFFBDA" Offset="1"/>
                                                                <GradientStop Color="#FFFFC92B" Offset="0.5"/>
                                                                <GradientStop Color="#FFFEEBAE" Offset="0.51"/>
                                                            </LinearGradientBrush>
                                                        </Border.Background>
                                                    </Border>
                                                </Grid>
                                                <ControlTemplate.Triggers>
                                                    <Trigger Property="IsMouseOver" Value="True">
                                                        <Setter Property="Background" TargetName="border">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                                                    <GradientStop Color="#FFFFD74E" Offset="0"/>
                                                                    <GradientStop Color="#FFFFDCAB" Offset="1"/>
                                                                    <GradientStop Color="#FFFE9227" Offset="0.5"/>
                                                                    <GradientStop Color="#FFFFD18F" Offset="0.51"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </Trigger>
                                                    <EventTrigger RoutedEvent="Thumb.DragStarted"/>
                                                </ControlTemplate.Triggers>
                                            </ControlTemplate>
                                        </Thumb.Template>
                                    </Thumb>
                                    <Thumb x:Name="VerticalRangeEndThumb" HorizontalAlignment="Center" Height="8" IsEnabled="{TemplateBinding IsEnabled}" Grid.Row="1" Visibility="{TemplateBinding ThumbVisibility}" Width="18">
                                        <Thumb.Template>
                                            <ControlTemplate TargetType="{x:Type Thumb}">
                                                <Grid>
                                                    <Border x:Name="Border" BorderBrush="#FF83A5D2" BorderThickness="1" CornerRadius="1">
                                                        <Border.Background>
                                                            <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                                                <GradientStop Color="#FFEBF3FF"/>
                                                                <GradientStop Color="#FFD0F3FF" Offset="1"/>
                                                                <GradientStop Color="#FFA1C5F2" Offset="0.43"/>
                                                                <GradientStop Color="#FFCAE1FF" Offset="0.42"/>
                                                            </LinearGradientBrush>
                                                        </Border.Background>
                                                        <Border x:Name="InnerBorder" BorderBrush="White" BorderThickness="1" CornerRadius="0"/>
                                                    </Border>
                                                </Grid>
                                                <ControlTemplate.Triggers>
                                                    <Trigger Property="IsMouseOver" Value="True">
                                                        <Setter Property="BorderBrush" TargetName="Border" Value="#FFFFC92B"/>
                                                        <Setter Property="BorderBrush" TargetName="InnerBorder" Value="White"/>
                                                        <Setter Property="Background" TargetName="Border">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                                                    <GradientStop Color="#FFFFFBA3" Offset="1"/>
                                                                    <GradientStop Color="#FFFFFBDA" Offset="0"/>
                                                                    <GradientStop Color="#FFFFD25A" Offset="0.43"/>
                                                                    <GradientStop Color="#FFFEEBAE" Offset="0.42"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </Trigger>
                                                    <Trigger Property="IsEnabled" Value="False">
                                                        <Setter Property="BorderBrush" TargetName="Border" Value="#FF83A5D2"/>
                                                        <Setter Property="BorderBrush" TargetName="InnerBorder" Value="Transparent"/>
                                                        <Setter Property="Background" TargetName="Border" Value="#FFE2F0FD"/>
                                                    </Trigger>
                                                    <Trigger Property="IsDragging" Value="True">
                                                        <Setter Property="BorderBrush" TargetName="Border">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                                                    <GradientStop Color="#FF616161" Offset="0"/>
                                                                    <GradientStop Color="#FF989898" Offset="1"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                        <Setter Property="BorderBrush" TargetName="InnerBorder">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                                                    <GradientStop Color="#FFB69A78"/>
                                                                    <GradientStop Color="#FFFFE17A" Offset="0.126"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                        <Setter Property="Background" TargetName="Border">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                                                    <GradientStop Color="#FFFFD74E" Offset="0.996"/>
                                                                    <GradientStop Color="#FFFFDCAB" Offset="0.17"/>
                                                                    <GradientStop Color="#FFFE9227" Offset="0.57"/>
                                                                    <GradientStop Color="#FFFFD18F" Offset="0.56"/>
                                                                    <GradientStop Color="#FFFFBA74" Offset="0"/>
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </Trigger>
                                                </ControlTemplate.Triggers>
                                            </ControlTemplate>
                                        </Thumb.Template>
                                    </Thumb>
                                    <Rectangle x:Name="VerticalRangeLargeIncrease" Cursor="Hand" Fill="Transparent" Opacity="0" Grid.Row="0"/>
                                </Grid>
                                <RepeatButton x:Name="VerticalDecreaseHandle" Grid.Column="1" Delay="{TemplateBinding Delay}" HorizontalAlignment="Center" IsEnabled="{TemplateBinding IsEnabled}" Interval="{TemplateBinding RepeatInterval}" Margin="0,2,0,0" Grid.Row="2" RenderTransformOrigin="0.5,0.5" Visibility="{TemplateBinding HandlesVisibility}">
                                    <RepeatButton.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform ScaleY="-1" ScaleX="-1"/>
                                            <RotateTransform Angle="90"/>
                                        </TransformGroup>
                                    </RepeatButton.RenderTransform>
                                    <RepeatButton.Style>
                                        <Style TargetType="{x:Type RepeatButton}">
                                            <Setter Property="IsTabStop" Value="False"/>
                                            <Setter Property="Cursor" Value="Hand"/>
                                            <Setter Property="Template">
                                                <Setter.Value>
                                                    <ControlTemplate TargetType="{x:Type RepeatButton}">
                                                        <Grid x:Name="Root" Height="18" Width="18">
                                                            <Border x:Name="Border" BorderBrush="#FF83A5D2" BorderThickness="1" CornerRadius="1">
                                                                <Border.Background>
                                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                        <GradientStop Color="#FFEBF3FF"/>
                                                                        <GradientStop Color="#FFD0F3FF" Offset="1"/>
                                                                        <GradientStop Color="#FFA1C5F2" Offset="0.43"/>
                                                                        <GradientStop Color="#FFCAE1FF" Offset="0.42"/>
                                                                    </LinearGradientBrush>
                                                                </Border.Background>
                                                                <Border x:Name="InnerBorder" BorderBrush="White" BorderThickness="1" CornerRadius="0"/>
                                                            </Border>
                                                            <Telerik_Windows_Controls_Chromes:ButtonChrome CornerRadius="1" RenderNormal="False" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" RenderFocused="{TemplateBinding IsFocused}" RenderEnabled="{TemplateBinding IsEnabled}">
                                                                <telerik:StyleManager.Theme>
                                                                    <telerik:Office_BlueTheme/>
                                                                </telerik:StyleManager.Theme>
                                                            </Telerik_Windows_Controls_Chromes:ButtonChrome>
                                                            <Path x:Name="Path" Data="M3,0L4,0 4,1 4,2 4,3 4,4 4,5 4,6 4,7 3,7 3,6 2,6 2,5 1,5 1,4 0,4 0,3 1,3 1,2 2,2 2,1 3,1z" Fill="#FF3C6AA3" HorizontalAlignment="Center" Height="7" RenderTransformOrigin="0.5,0.5" Stretch="Fill" VerticalAlignment="Center" Width="4"/>
                                                        </Grid>
                                                        <ControlTemplate.Triggers>
                                                            <Trigger Property="IsMouseOver" Value="True">
                                                                <Setter Property="Fill" TargetName="Path" Value="#FF3C6AA3"/>
                                                            </Trigger>
                                                            <Trigger Property="IsPressed" Value="True">
                                                                <Setter Property="Fill" TargetName="Path" Value="Black"/>
                                                            </Trigger>
                                                            <Trigger Property="IsEnabled" Value="False">
                                                                <Setter Property="Fill" TargetName="Path" Value="#FF8D8D8D"/>
                                                            </Trigger>
                                                        </ControlTemplate.Triggers>
                                                    </ControlTemplate>
                                                </Setter.Value>
                                            </Setter>
                                        </Style>
                                    </RepeatButton.Style>
                                </RepeatButton>
                                <RepeatButton x:Name="VerticalIncreaseHandle" Grid.Column="1" Delay="{TemplateBinding Delay}" HorizontalAlignment="Center" IsEnabled="{TemplateBinding IsEnabled}" Interval="{TemplateBinding RepeatInterval}" Margin="0,0,0,2" Grid.Row="0" RenderTransformOrigin="0.5,0.5" Visibility="{TemplateBinding HandlesVisibility}">
                                    <RepeatButton.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform ScaleY="-1" ScaleX="1"/>
                                            <RotateTransform Angle="90"/>
                                        </TransformGroup>
                                    </RepeatButton.RenderTransform>
                                    <RepeatButton.Style>
                                        <Style TargetType="{x:Type RepeatButton}">
                                            <Setter Property="IsTabStop" Value="False"/>
                                            <Setter Property="Cursor" Value="Hand"/>
                                            <Setter Property="Template">
                                                <Setter.Value>
                                                    <ControlTemplate TargetType="{x:Type RepeatButton}">
                                                        <Grid x:Name="Root" Height="18" Width="18">
                                                            <Border x:Name="Border" BorderBrush="#FF83A5D2" BorderThickness="1" CornerRadius="1">
                                                                <Border.Background>
                                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                        <GradientStop Color="#FFEBF3FF"/>
                                                                        <GradientStop Color="#FFD0F3FF" Offset="1"/>
                                                                        <GradientStop Color="#FFA1C5F2" Offset="0.43"/>
                                                                        <GradientStop Color="#FFCAE1FF" Offset="0.42"/>
                                                                    </LinearGradientBrush>
                                                                </Border.Background>
                                                                <Border x:Name="InnerBorder" BorderBrush="White" BorderThickness="1" CornerRadius="0"/>
                                                            </Border>
                                                            <Telerik_Windows_Controls_Chromes:ButtonChrome CornerRadius="1" RenderNormal="False" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" RenderFocused="{TemplateBinding IsFocused}" RenderEnabled="{TemplateBinding IsEnabled}">
                                                                <telerik:StyleManager.Theme>
                                                                    <telerik:Office_BlueTheme/>
                                                                </telerik:StyleManager.Theme>
                                                            </Telerik_Windows_Controls_Chromes:ButtonChrome>
                                                            <Path x:Name="Path" Data="M3,0L4,0 4,1 4,2 4,3 4,4 4,5 4,6 4,7 3,7 3,6 2,6 2,5 1,5 1,4 0,4 0,3 1,3 1,2 2,2 2,1 3,1z" Fill="#FF3C6AA3" HorizontalAlignment="Center" Height="7" RenderTransformOrigin="0.5,0.5" Stretch="Fill" VerticalAlignment="Center" Width="4"/>
                                                        </Grid>
                                                        <ControlTemplate.Triggers>
                                                            <Trigger Property="IsMouseOver" Value="True">
                                                                <Setter Property="Fill" TargetName="Path" Value="#FF3C6AA3"/>
                                                            </Trigger>
                                                            <Trigger Property="IsPressed" Value="True">
                                                                <Setter Property="Fill" TargetName="Path" Value="Black"/>
                                                            </Trigger>
                                                            <Trigger Property="IsEnabled" Value="False">
                                                                <Setter Property="Fill" TargetName="Path" Value="#FF8D8D8D"/>
                                                            </Trigger>
                                                        </ControlTemplate.Triggers>
                                                    </ControlTemplate>
                                                </Setter.Value>
                                            </Setter>
                                        </Style>
                                    </RepeatButton.Style>
                                </RepeatButton>
                            </Grid>
                        </Grid>
                        <Rectangle x:Name="FocusVisual" Opacity="0" RadiusY="2" RadiusX="2" Stroke="Black" StrokeThickness="1" StrokeDashArray="1 2"/>
                        <Border x:Name="ValidationErrorElement" BorderBrush="#FFDB000C" BorderThickness="1" CornerRadius="1" Visibility="Collapsed">
                            <Border.ToolTip>
                                <ToolTip x:Name="validationTooltip" Placement="Right">
                                    <ToolTip.Triggers>
                                        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsHitTestVisible" Storyboard.TargetName="validationTooltip">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <System:Boolean>True</System:Boolean>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </EventTrigger>
                                    </ToolTip.Triggers>
                                    <ToolTip.Template>
                                        <ControlTemplate TargetType="{x:Type ToolTip}">
                                            <Grid x:Name="Root" Margin="5,0" Opacity="0" RenderTransformOrigin="0,0">
                                                <Grid.RenderTransform>
                                                    <TranslateTransform X="-25"/>
                                                </Grid.RenderTransform>
                                                <Border Background="#FFDC000C" CornerRadius="2"/>
                                                <Border CornerRadius="2">
                                                    <TextBlock Foreground="White" MaxWidth="250" Margin="8,3" TextWrapping="Wrap" Text="{Binding (Validation.Errors)[0].ErrorContent}"/>
                                                </Border>
                                            </Grid>
                                            <ControlTemplate.Triggers>
                                                <Trigger Property="IsOpen" Value="True">
                                                    <Trigger.EnterActions>
                                                        <BeginStoryboard>
                                                            <Storyboard x:Name="OpenAnimation">
                                                                <DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="X" Storyboard.TargetName="xform"/>
                                                                <DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
                                                            </Storyboard>
                                                        </BeginStoryboard>
                                                    </Trigger.EnterActions>
                                                    <Trigger.ExitActions>
                                                        <StopStoryboard BeginStoryboardName="OpenAnimation"/>
                                                    </Trigger.ExitActions>
                                                </Trigger>
                                                <Trigger Property="IsOpen" Value="True">
                                                    <Setter Property="RenderTransform" TargetName="Root">
                                                        <Setter.Value>
                                                            <TranslateTransform X="0"/>
                                                        </Setter.Value>
                                                    </Setter>
                                                    <Setter Property="Opacity" TargetName="Root" Value="1"/>
                                                </Trigger>
                                                <Trigger Property="IsOpen" Value="False">
                                                    <Setter Property="Opacity" TargetName="Root" Value="0"/>
                                                </Trigger>
                                            </ControlTemplate.Triggers>
                                        </ControlTemplate>
                                    </ToolTip.Template>
                                </ToolTip>
                            </Border.ToolTip>
                            <Grid Background="Transparent" HorizontalAlignment="Right" Height="12" Margin="1,-4,-4,0" VerticalAlignment="Top" Width="12">
                                <Path Data="M1,0L6,0A2,2,90,0,1,8,2L8,7z" Fill="#FFDC000C" Margin="1,3,0,0"/>
                                <Path Data="M0,0L2,0 8,6 8,8" Fill="White" Margin="1,3,0,0"/>
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>






  5. Answer
    Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 13 Oct 2010 Link to this post

    Hi Ruben Hakopian,

    Please accept my apology for the delayed response.

    Unfortunately, I couldn't reproduce the issue. Can you please take a look at the attached sample and let me know if it works for you or if I am missing something.

    All the best,
    Tina Stancheva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Ruben Hakopian
    Ruben Hakopian avatar
    37 posts
    Member since:
    Nov 2009

    Posted 13 Oct 2010 Link to this post

    Hi Tina,

    Yes, it does not happen in the sample application, and i have a hard time to reproduce that exception in a sample application. 
    Will post here when I have a chance to reproduce it in a sample application.

    Thanks,
    Ruben
  7. Ruben Hakopian
    Ruben Hakopian avatar
    37 posts
    Member since:
    Nov 2009

    Posted 08 Nov 2010 Link to this post

    This issue was fixed in internal build version 2010.2.1022.35.
Back to Top
UI for WPF is Visual Studio 2017 Ready