SelectedItem Null on Drag ListBox

1 posts, 0 answers
  1. vinay Theethira
    vinay Theethira avatar
    35 posts
    Member since:
    Mar 2010

    Posted 03 Jun 2011 Link to this post

    Hi,
    I am trying to Add DragDrop functionality from listbox to TileView.
    But when i drag an item from ListBox i get the Drag event fired but i am not getting the selectedItem value.
    The code is pretty simple
    Below is my code,
    Imports Telerik.Windows.Controls.DragDrop
    Imports Telerik.Windows.Controls
    Imports Telerik.Windows
     
    Partial Public Class ReportDashBoard
        Inherits UserControl
        Private tileViewItemInfo As RadTileViewItem
        Dim currentTileView As List(Of String)
        Private Shared _viewList As New Dictionary(Of [String], Object)()
     
        Public Sub New()
            InitializeComponent()
            GetListViewItmes()
     
        End Sub
     
        Private Sub GetListViewItmes()
     
            Dim btnList As New List(Of Button) From {
            New Button With {.Name = "btn1", .Content = "Medical Identity Reports"},
            New Button With {.Name = "btn2", .Content = "Activity Reports"},
            New Button With {.Name = "btn3", .Content = "Dictionary Edit Reports"},
            New Button With {.Name = "btn4", .Content = "CareTaker Reports"},
            New Button With {.Name = "btn5", .Content = "Dial Up Reports"}
        }
            lstExpandView.ItemsSource = btnList
            lstExpandView.DataContext = btnList
     
            RadDragAndDropManager.AddDragInfoHandler(lstExpandView, AddressOf OnDragInfo)
            RadDragAndDropManager.AddDragQueryHandler(lstExpandView, AddressOf OnDragQuery)
            RadDragAndDropManager.AddDropInfoHandler(dragDockPanelHost, AddressOf OnDropInfo)
            RadDragAndDropManager.AddDropQueryHandler(dragDockPanelHost, AddressOf OnDropQuery)
            RadDragAndDropManager.SetAllowDrop(dragDockPanelHost, True)
     
            EventManager.RegisterClassHandler(GetType(RadTileViewItem), RadDragAndDropManager.DropInfoEvent, New EventHandler(Of DragDropEventArgs)(AddressOf OnDropInfo), True)
     
     
     
        End Sub
     
     
        Private Sub OnDropInfo(ByVal sender As Object, ByVal e As DragDropEventArgs)
            Try
                Dim destination = e.Options.Destination
     
                ' Added to a container on drag drop
                If e.Options.Status = DragStatus.DropComplete Then
     
                    ''remove information tile.
                    'If tileViewItemInfo IsNot Nothing Then
                    '    dragDockPanelHost.Items.Remove(tileViewItemInfo)
                    '    currentTileView.Remove(tileViewItemInfo.Tag.ToString())
                    '    tileViewItemInfo.Content = Nothing
                    '    tileViewItemInfo = Nothing
                    'End If
     
                    If TypeOf destination Is RadTileView OrElse TypeOf destination Is RadTileViewItem Then
                        Dim header As String = String.Empty
                        Dim selectedSection As String = String.Empty
     
                        If DirectCast(e.Options.Source, System.Windows.Controls.Primitives.Selector).SelectedItem IsNot Nothing Then
                            header = "Header"
                            selectedSection = "Hello Grid"
                            AddPanel(selectedSection, header)
                        End If
                    End If
                End If
            Catch ex As Exception
     
            End Try
        End Sub
     
        Private Sub OnDropQuery(ByVal sender As Object, ByVal e As DragDropQueryEventArgs)
            Try
                Dim destination = e.Options.Destination
                e.QueryResult = True
                e.Handled = True
            Catch ex As Exception
     
            End Try
        End Sub
     
        Private Sub OnDragInfo(ByVal sender As Object, ByVal e As DragDropEventArgs)
            Try
                If e.Options.Status = DragStatus.DragComplete Then
                End If
            Catch ex As Exception
     
            End Try
        End Sub
     
        Protected Sub OnDragQuery(ByVal sender As Object, ByVal e As DragDropQueryEventArgs)
            Try
                Dim destination = e.Options.Destination
     
                If e.Options.Status = DragStatus.DragQuery Then
                    Dim sourceControl = e.Options.Source
                    Dim sourceElement As System.Windows.Controls.ListBox = TryCast(e.Options.Source, System.Windows.Controls.ListBox)
                    Dim box As System.Windows.Controls.ListBox = TryCast(System.Windows.Controls.ItemsControl.ItemsControlFromItemContainer(TryCast(sourceElement.SelectedItem, System.Windows.Controls.ListBoxItem)), System.Windows.Controls.ListBox)
     
                    Dim textDraginfo As New TextBlock() With { _
                      .Height = 200, _
                     .TextWrapping = TextWrapping.Wrap, _
                     .FontSize = 10, _
                     .TextAlignment = System.Windows.TextAlignment.Center, _
                     .LineStackingStrategy = System.Windows.LineStackingStrategy.BlockLineHeight, _
                     .Width = 100 _
                    }
     
     
                    textDraginfo.Text = "Some Text.."
                    'var dragCue = RadDragAndDropManager.GenerateVisualCue(sourceElement.SelectedItem as FrameworkElement);
                    Dim dragCue = RadDragAndDropManager.GenerateVisualCue(textDraginfo)
                    e.Options.DragCue = dragCue
                    e.Options.ArrowCue = RadDragAndDropManager.GenerateArrowCue()
                End If
     
                e.QueryResult = True
                e.Handled = True
            Catch ex As Exception
     
            End Try
     
        End Sub
     
        Private Sub LayoutRoot_LayoutUpdated(ByVal sender As System.Object, ByVal e As System.EventArgs)
     
        End Sub
     
        Private Sub AddPanel(ByVal selectedSection As String, ByVal header As String)
            Try
                Dim random As New Random()
                Dim ran As Integer = random.[Next](1, 100)
                Dim tileViewId As String = "tileView" & ran.ToString()
     
                ' Check if section is already part of expanded view.
                If Not currentTileView.Contains(selectedSection) AndAlso _viewList.ContainsKey(selectedSection) Then
                    Dim tileViewItem As New RadTileViewItem() With { _
                     .Tag = selectedSection, _
                     .Style = TryCast(Me.Resources("radTVItemStyle"), Style) _
                    }
     
                    RadDragAndDropManager.SetAllowDrop(tileViewItem, True)
                    GetTileItemContent(selectedSection, tileViewItem, header)
     
                    ' Add only four items to panel.
                    If Me.dragDockPanelHost.Items.Count <= 3 AndAlso tileViewItem.Position < 0 Then
                        Me.dragDockPanelHost.Items.Add(tileViewItem)
                    End If
                End If
            Catch ex As Exception
     
            End Try
        End Sub
     
        Private Sub GetTileItemContent(ByVal selectedSection As String, ByVal tileViewItem As RadTileViewItem, ByVal header As String)
            Try
                If Not currentTileView.Contains(selectedSection) AndAlso _viewList.ContainsKey(selectedSection) Then
                    currentTileView.Remove(tileViewItem.Tag.ToString())
                    tileViewItem.Tag = selectedSection
                    tileViewItem.Header = header
     
                    tileViewItem.Content = DirectCast(_viewList(selectedSection), UserControl)
                    currentTileView.Add(selectedSection)
     
                    'If TypeOf _viewList(selectedSection) Is RadChart Then
                    '    tileViewItem.Content = DirectCast(_viewList(selectedSection), RadChart)
                    '    currentTileView.Add(selectedSection)
                    'ElseIf TypeOf _viewList(selectedSection) Is RadGridView Then
                    '    tileViewItem.Content = DirectCast(_viewList(selectedSection), RadGridView)
                    '    currentTileView.Add(selectedSection)
                    'End If
                End If
            Catch ex As Exception
     
            End Try
     
        End Sub
     
     
     
    End Class
    I need to get the Selected Item in OnDropInfo
    so that i can Add a Panel to TileView according to selected Item.
    Here is my XAML File,
    <UserControl x:Class="Iatric.SAM.DashBoard.ReportDashBoard"
                  
                 xmlns:telerikControl="clr-namespace:Telerik.Windows.Controls.DragDrop;assembly=Telerik.Windows.Controls"
                 xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
                 xmlns:dragDrop="clr-namespace:Telerik.Windows.Controls.DragDrop;assembly=Telerik.Windows.Controls"
                 xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
                 xmlns:telerikStyle="http://schemas.telerik.com/2008/xaml/presentation"
                 xmlns:System="clr-namespace:System;assembly=mscorlib" mc:Ignorable="d"
                  
        d:DesignHeight="300" d:DesignWidth="400">
     
        <UserControl.Resources>
            <Style x:Key="radTVItemStyle" TargetType="telerikNavigation:RadTileViewItem">
                <Setter Property="HorizontalContentAlignment" Value="Stretch" />
                <Setter Property="VerticalContentAlignment" Value="Stretch" />
                <!--<Setter Property="Background" Value="{StaticResource TileView_Background}" />
                <Setter Property="BorderBrush" Value="{StaticResource TileView_OuterBorder}" />-->
                <Setter Property="BorderThickness" Value="1" />
                <Setter Property="Padding" Value="7" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="telerikNavigation:RadTileViewItem">
                            <Grid>
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualState x:Name="Normal" />
                                        <VisualState x:Name="Disabled">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Visibility">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="MouseOver" />
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <Border Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource TileView_OuterBorder_CornerRadius}">
                                    <Border BorderBrush="{StaticResource TileView_InneBorder}" BorderThickness="{StaticResource TileView_InneBorder_Thickness}" CornerRadius="{StaticResource TileView_InneBorder_CornerRadius}">
                                        <Grid>
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto" />
                                                <RowDefinition Height="*" />
                                            </Grid.RowDefinitions>
                                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Row="1" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
                                            <StackPanel>
                                                <Border Background="{StaticResource TileView_HeaderBackground}" BorderBrush="{StaticResource TileView_HeaderBorder}" BorderThickness="{StaticResource TileView_HeaderBorder_Thickness}" CornerRadius="{StaticResource TileView_HeaderBorder_CornerRadius}" Padding="10 0 7 0">
                                                    <Grid MinHeight="28">
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="*" />
                                                            <ColumnDefinition Width="Auto" />
                                                        </Grid.ColumnDefinitions>
                                                        <Border x:Name="GripBarElement" Background="Transparent">
                                                            <Grid>
                                                                <Grid.ColumnDefinitions>
                                                                    <ColumnDefinition Width="Auto" />
                                                                    <ColumnDefinition Width="*" />
                                                                </Grid.ColumnDefinitions>
                                                                <ContentPresenter x:Name="HeaderElement" HorizontalAlignment="Stretch" VerticalAlignment="Center" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" />
                                                                 
     
                                                            </Grid>
                                                        </Border>
                                                        <ToggleButton x:Name="MaximizeToggleButton" Grid.Column="1" Height="17" HorizontalAlignment="Right" VerticalAlignment="Center" Width="17">
                                                            <ToggleButton.Template>
                                                                <ControlTemplate TargetType="ToggleButton">
                                                                    <Grid>
                                                                        <VisualStateManager.VisualStateGroups>
                                                                            <VisualStateGroup x:Name="FocusStates">
                                                                                <VisualState x:Name="Focused" />
                                                                                <VisualState x:Name="Unfocused" />
                                                                            </VisualStateGroup>
                                                                            <VisualStateGroup x:Name="CommonStates">
                                                                                <VisualState x:Name="Disabled" />
                                                                                <VisualState x:Name="Normal" />
                                                                                <VisualState x:Name="MouseOver">
                                                                                    <Storyboard>
                                                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RestoreIcon" Storyboard.TargetProperty="Fill">
                                                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TileView_ButtonBackground_MouseOver}" />
                                                                                        </ObjectAnimationUsingKeyFrames>
                                                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CollapseIcon" Storyboard.TargetProperty="Fill">
                                                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TileView_ButtonBackground_MouseOver}" />
                                                                                        </ObjectAnimationUsingKeyFrames>
                                                                                    </Storyboard>
                                                                                </VisualState>
                                                                                <VisualState x:Name="Pressed">
                                                                                    <Storyboard>
                                                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RestoreIcon" Storyboard.TargetProperty="Fill">
                                                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TileView_ButtonBackground_Pressed}" />
                                                                                        </ObjectAnimationUsingKeyFrames>
                                                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CollapseIcon" Storyboard.TargetProperty="Fill">
                                                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TileView_ButtonBackground_Pressed}" />
                                                                                        </ObjectAnimationUsingKeyFrames>
                                                                                    </Storyboard>
                                                                                </VisualState>
                                                                            </VisualStateGroup>
                                                                            <VisualStateGroup x:Name="CheckStates">
                                                                                <VisualState x:Name="Checked">
                                                                                    <Storyboard>
                                                                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Restore" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                            <SplineDoubleKeyFrame KeySpline="0,0,0,1" KeyTime="00:00:01" Value="0" />
                                                                                        </DoubleAnimationUsingKeyFrames>
                                                                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Collapse" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                            <SplineDoubleKeyFrame KeySpline="0,0,0,1" KeyTime="00:00:01" Value="1" />
                                                                                        </DoubleAnimationUsingKeyFrames>
                                                                                    </Storyboard>
                                                                                </VisualState>
                                                                                <VisualState x:Name="Unchecked">
                                                                                    <Storyboard>
                                                                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Restore" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                            <SplineDoubleKeyFrame KeySpline="0,0,0,1" KeyTime="00:00:01" Value="1" />
                                                                                        </DoubleAnimationUsingKeyFrames>
                                                                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Collapse" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                            <SplineDoubleKeyFrame KeySpline="0,0,0,1" KeyTime="00:00:01" Value="0" />
                                                                                        </DoubleAnimationUsingKeyFrames>
                                                                                    </Storyboard>
                                                                                </VisualState>
                                                                                <VisualState x:Name="Indeterminate" />
                                                                            </VisualStateGroup>
                                                                        </VisualStateManager.VisualStateGroups>
                                                                        <Grid x:Name="Restore" Height="13" Width="13">
                                                                            <ToolTipService.ToolTip>
                                                                                <ToolTip telerik:LocalizationManager.ResourceKey="TileViewItemMaximizeText" />
                                                                            </ToolTipService.ToolTip>
                                                                            <Path x:Name="RestoreIcon" Fill="{StaticResource TileView_ButtonBackground}" Stretch="Fill" Stroke="{x:Null}" StrokeThickness="0.5" Margin="1" Data="M2,5 L2,8.9999999 6,8.9999999 6,5 z M0,3 L8,3 8,5 8,8.9999999 8,11 0,11 0,8.9999999 0,5 z M3,0 L11,0 11,2 11,8.9999999 9,8.9999999 9,2 3,2 z" />
                                                                            <Path Fill="{StaticResource TileView_ButtonOuterBorder}" Stretch="Fill" Stroke="{x:Null}" StrokeThickness="0.5" Data="M1,12 L9,12 9,13 1,13 z M3.9999999,7 L3.9999999,9 6,9 6,7 z M3,6 L7,6 7,7 7,9 7,10 3,10 3,9 3,7 z M0,4 L1,4 1,12 0,12 z M12,1 L13,1 13,10 12,10 z M3,1 L3.9999999,1 3.9999999,3 10,3 10,4 10,10 12,10 12,11 10,11 10,12 9,12 9,4 1,4 1,3 3,3 z M3.9999999,0 L12,0 12,1 3.9999999,1 z" />
                                                                        </Grid>
                                                                        <Grid x:Name="Collapse" Height="5" Width="12" Opacity="0">
                                                                            <ToolTipService.ToolTip>
                                                                                <ToolTip telerik:LocalizationManager.ResourceKey="TileViewItemMinimizeText" />
                                                                            </ToolTipService.ToolTip>
                                                                            <Rectangle Fill="{StaticResource TileView_ButtonOuterBorder}" Stroke="{x:Null}" StrokeThickness="0.5" />
                                                                            <Rectangle x:Name="CollapseIcon" Fill="{StaticResource TileView_ButtonBackground}" Stroke="{x:Null}" StrokeThickness="0.5" Margin="1" />
                                                                        </Grid>
                                                                    </Grid>
                                                                </ControlTemplate>
                                                            </ToggleButton.Template>
                                                        </ToggleButton>
                                                    </Grid>
                                                </Border>
                                                <Border x:Name="Splitter" Height="4" OpacityMask="{StaticResource TileView_HeaderBorder_HorizontalSplitterOpacityMask}" Background="{StaticResource TileView_HeaderBorder_HorizontalSplitterBackground}" BorderThickness="0" />
                                            </StackPanel>
                                            <Rectangle x:Name="DisabledVisual" Fill="{StaticResource DisabledBrush}" RadiusX="4" RadiusY="4" Visibility="Collapsed" Grid.RowSpan="2" />
                                        </Grid>
                                    </Border>
                                </Border>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
     
            <DataTemplate x:Key="itemTem">
                <Grid x:Name="grdMainN" Width="75" Height="100">
                    <VisualStateManager.VisualStateGroups>
                        <VisualStateGroup x:Name="FocusStates">
                            <VisualState x:Name="Focused" />
                            <VisualState x:Name="Unfocused" />
                        </VisualStateGroup>
                        <VisualStateGroup x:Name="CommonStates">
                            <VisualState x:Name="Normal" />
                            <VisualState x:Name="MouseOver" />
                            <VisualState x:Name="Pressed" />
                            <VisualState x:Name="Disabled" />
                        </VisualStateGroup>
                    </VisualStateManager.VisualStateGroups>
                    <StackPanel Orientation="Vertical">
                        <Image x:Name="imgGraph3" Source="{Binding Image}" Height="65" VerticalAlignment="Top" />
                        <TextBlock x:Name="graphData" Text="{Binding Displaytext}" Height="30" TextWrapping="Wrap" FontFamily="Arial" FontSize="10" FontWeight="Bold" TextAlignment="Center" LineStackingStrategy="BlockLineHeight" LineHeight="13" Foreground="#FF1B6E8B" VerticalAlignment="Bottom" />
                    </StackPanel>
                </Grid>
            </DataTemplate>
            <ControlTemplate x:Key="ValidationToolTipTemplate">
                <Grid x:Name="Root" Margin="5,0" Opacity="0" RenderTransformOrigin="0,0">
                    <VisualStateManager.VisualStateGroups>
                        <VisualStateGroup x:Name="OpenStates">
                            <VisualStateGroup.Transitions>
                                <VisualTransition GeneratedDuration="0" />
                                <VisualTransition GeneratedDuration="0:0:0.2" To="Open">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                            <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualTransition>
                            </VisualStateGroup.Transitions>
                            <VisualState x:Name="Closed">
                                <Storyboard>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                        <SplineDoubleKeyFrame KeyTime="0" Value="0" />
                                    </DoubleAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                            <VisualState x:Name="Open">
                                <Storyboard>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                        <SplineDoubleKeyFrame KeyTime="0" Value="0" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                        <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                    </DoubleAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                        </VisualStateGroup>
                    </VisualStateManager.VisualStateGroups>
                    <Grid.RenderTransform>
                        <TranslateTransform x:Name="xform" X="-25" />
                    </Grid.RenderTransform>
                    <Border Margin="4,4,-4,-4" Background="#052A2E31" CornerRadius="5" />
                    <Border Margin="3,3,-3,-3" Background="#152A2E31" CornerRadius="4" />
                    <Border Margin="2,2,-2,-2" Background="#252A2E31" CornerRadius="3" />
                    <Border Margin="1,1,-1,-1" Background="#352A2E31" CornerRadius="2" />
                    <Border Background="#FFDC000C" CornerRadius="2" />
                    <Border CornerRadius="2">
                        <TextBlock Margin="8,4,8,4" MaxWidth="250" UseLayoutRounding="false" Foreground="White" Text="{Binding (Validation.Errors)[0].ErrorContent}" TextWrapping="Wrap" />
                    </Border>
                </Grid>
            </ControlTemplate>
            <ItemsPanelTemplate x:Key="IPnlTemp">
                <StackPanel Orientation="Horizontal" />
            </ItemsPanelTemplate>
            <Style x:Key="LstBoxStyl" TargetType="ListBox">
                <Setter Property="Padding" Value="1" />
                <Setter Property="Background" Value="#FFFFFFFF" />
                <Setter Property="Foreground" Value="#FF000000" />
                <Setter Property="HorizontalContentAlignment" Value="Left" />
                <Setter Property="VerticalContentAlignment" Value="Top" />
                <Setter Property="IsTabStop" Value="False" />
                <Setter Property="BorderThickness" Value="1" />
                <Setter Property="TabNavigation" Value="Once" />
                <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
                <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
                <Setter Property="BorderBrush">
                    <Setter.Value>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FFA3AEB9" Offset="0" />
                            <GradientStop Color="#FF8399A9" Offset="0.375" />
                            <GradientStop Color="#FF718597" Offset="0.375" />
                            <GradientStop Color="#FF617584" Offset="1" />
                        </LinearGradientBrush>
                    </Setter.Value>
                </Setter>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="ListBox">
                            <Grid>
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="ValidationStates">
                                        <VisualState x:Name="Valid" />
                                        <VisualState x:Name="InvalidUnfocused">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationErrorElement" Storyboard.TargetProperty="Visibility">
                                                    <DiscreteObjectKeyFrame KeyTime="0">
                                                        <DiscreteObjectKeyFrame.Value>
                                                            <Visibility>Visible</Visibility>
                                                        </DiscreteObjectKeyFrame.Value>
                                                    </DiscreteObjectKeyFrame>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="InvalidFocused">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationErrorElement" Storyboard.TargetProperty="Visibility">
                                                    <DiscreteObjectKeyFrame KeyTime="0">
                                                        <DiscreteObjectKeyFrame.Value>
                                                            <Visibility>Visible</Visibility>
                                                        </DiscreteObjectKeyFrame.Value>
                                                    </DiscreteObjectKeyFrame>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="validationTooltip" Storyboard.TargetProperty="IsOpen">
                                                    <DiscreteObjectKeyFrame KeyTime="0">
                                                        <DiscreteObjectKeyFrame.Value>
                                                            <System:Boolean>True</System:Boolean>
                                                        </DiscreteObjectKeyFrame.Value>
                                                    </DiscreteObjectKeyFrame>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <Border BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
                                    <ScrollViewer x:Name="ScrollViewer" BorderBrush="Transparent" BorderThickness="0" Padding="{TemplateBinding Padding}"
                                                  TabNavigation="{TemplateBinding TabNavigation}"
                                                  Background="#FFEEF2F3">
                                        <ItemsPresenter Height="100" />
                                    </ScrollViewer>
                                </Border>
                                <Border x:Name="ValidationErrorElement" Visibility="Collapsed" BorderBrush="#FFDB000C" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
                                    <ToolTipService.ToolTip>
                                        <ToolTip x:Name="validationTooltip" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource ValidationToolTipTemplate}" Placement="Right" PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                                            <ToolTip.Triggers>
                                                <EventTrigger RoutedEvent="Canvas.Loaded">
                                                    <BeginStoryboard>
                                                        <Storyboard>
                                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="validationTooltip" Storyboard.TargetProperty="IsHitTestVisible">
                                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                                    <DiscreteObjectKeyFrame.Value>
                                                                        <System:Boolean>true</System:Boolean>
                                                                    </DiscreteObjectKeyFrame.Value>
                                                                </DiscreteObjectKeyFrame>
                                                            </ObjectAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </BeginStoryboard>
                                                </EventTrigger>
                                            </ToolTip.Triggers>
                                        </ToolTip>
                                    </ToolTipService.ToolTip>
                                    <Grid Height="10" HorizontalAlignment="Right" Margin="0,-4,-4,0" VerticalAlignment="Top" Width="10" Background="Transparent">
                                        <Path Fill="#FFDC000C" Margin="-1,3,0,0" Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" />
                                        <Path Fill="#ffffff" Margin="-1,3,0,0" Data="M 0,0 L2,0 L 8,6 L8,8" />
                                    </Grid>
                                </Border>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style x:Key="ScrlVwrStyl" TargetType="ScrollViewer">
                <Setter Property="HorizontalContentAlignment" Value="Left" />
                <Setter Property="VerticalContentAlignment" Value="Top" />
                <Setter Property="VerticalScrollBarVisibility" Value="Visible" />
                <!--<Setter Property="ScrollViewer.IsEnabled" Value="false" />-->
                <Setter Property="VerticalScrollBarVisibility" Value="Disabled" />
                <Setter Property="Padding" Value="4" />
                <Setter Property="BorderThickness" Value="1" />
                <Setter Property="BorderBrush">
                    <Setter.Value>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FFA3AEB9" Offset="0" />
                            <GradientStop Color="#FF8399A9" Offset="0.375" />
                            <GradientStop Color="#FF718597" Offset="0.375" />
                            <GradientStop Color="#FF617584" Offset="1" />
                        </LinearGradientBrush>
                    </Setter.Value>
                </Setter>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="ScrollViewer">
                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
                                <Grid Background="{TemplateBinding Background}">
                                    <ScrollContentPresenter x:Name="ScrollContentPresenter" Cursor="{TemplateBinding Cursor}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="25,0" />
                                    <!--<Rectangle Fill="#FFEEF2F3" Grid.Column="1" Grid.Row="1"/>-->
                                    <ScrollBar x:Name="VerticalScrollBar" Margin="0,-1,-1,-1" Width="25" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" IsTabStop="False" Grid.Column="1" Grid.Row="0" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Value="{TemplateBinding VerticalOffset}" Orientation="Vertical" ViewportSize="{TemplateBinding ViewportHeight}"
                                               Style="{StaticResource ScrBarStyle}" />
                                    <ScrollBar x:Name="HorizontalScrollBar" Height="25" Margin="-1,0,-1,-1" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" IsTabStop="False" Grid.Column="0" Grid.Row="1" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Value="{TemplateBinding HorizontalOffset}" Orientation="Horizontal" ViewportSize="{TemplateBinding ViewportWidth}" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Style="{StaticResource ScrBarStyle}" />
                                </Grid>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
     
            <Style x:Key="ScrBarStyle" TargetType="ScrollBar">
                <Setter Property="MinWidth" Value="17" />
                <Setter Property="MinHeight" Value="17" />
                <Setter Property="IsTabStop" Value="False" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="ScrollBar">
                            <Grid x:Name="Root">
                                <Grid.Resources>
                                    <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
                                        <Grid x:Name="Root" Background="Transparent">
                                            <VisualStateManager.VisualStateGroups>
                                                <VisualStateGroup x:Name="CommonStates">
                                                    <VisualState x:Name="Normal" />
                                                </VisualStateGroup>
                                            </VisualStateManager.VisualStateGroups>
                                        </Grid>
                                    </ControlTemplate>
                                    <ControlTemplate x:Key="HorizontalIncrementTemplate" TargetType="RepeatButton">
                                        <Grid x:Name="Root">
                                            <VisualStateManager.VisualStateGroups>
                                                <VisualStateGroup x:Name="CommonStates">
                                                    <VisualState x:Name="Normal" />
                                                    <VisualState x:Name="MouseOver">
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState x:Name="Pressed">
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState x:Name="Disabled">
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledElement" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value=".7" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                </VisualStateGroup>
                                            </VisualStateManager.VisualStateGroups>
                                            <Rectangle x:Name="Background" Fill="#FF90C2FD" StrokeThickness="1" RadiusX="20" RadiusY="20" Opacity="0.3" />
                                            <Rectangle x:Name="BackgroundAnimation" Fill="#FF448DCA" Stroke="#00000000" StrokeThickness="1" RadiusX="20" RadiusY="20" Opacity="0" />
                                            <Rectangle x:Name="BackgroundGradient" Stroke="#FFFFFFFF" StrokeThickness="1" RadiusX="20" RadiusY="20" Margin="1" Opacity="0">
                                                <Rectangle.Fill>
                                                    <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                                                        <GradientStop Color="#FFFFFFFF" Offset="0.013" />
                                                        <GradientStop Color="#F9FFFFFF" Offset="0.375" />
                                                        <GradientStop Color="#E5FFFFFF" Offset="0.603" />
                                                        <GradientStop Color="#C6FFFFFF" Offset="1" />
                                                    </LinearGradientBrush>
                                                </Rectangle.Fill>
                                            </Rectangle>
                                            <Rectangle x:Name="Highlight" Stroke="#FF6DBDD1" StrokeThickness="1" RadiusX="20" RadiusY="20" Margin="1" IsHitTestVisible="false" Opacity="0" />
                                            <Path Stretch="Uniform" Height="8" Width="4" Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z " RenderTransformOrigin="0.5,0.5">
                                                <Path.RenderTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform ScaleX="2" ScaleY="2" />
                                                        <SkewTransform AngleX="0" AngleY="0" />
                                                        <RotateTransform Angle="0" />
                                                        <TranslateTransform />
                                                    </TransformGroup>
                                                </Path.RenderTransform>
                                                <Path.Fill>
                                                    <SolidColorBrush x:Name="ButtonColor" Color="#FF537DD1" />
                                                </Path.Fill>
                                            </Path>
                                            <Rectangle x:Name="DisabledElement" Fill="#FFFFFFFF" RadiusX="20" RadiusY="20" Opacity="0" />
                                        </Grid>
                                    </ControlTemplate>
                                    <ControlTemplate x:Key="HorizontalDecrementTemplate" TargetType="RepeatButton">
                                        <Grid x:Name="Root">
                                            <VisualStateManager.VisualStateGroups>
                                                <VisualStateGroup x:Name="CommonStates">
                                                    <VisualState x:Name="Normal">
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="BackgroundMouseOver" Storyboard.TargetProperty="(Rectangle.RadiusX)">
                                                                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="20" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="BackgroundMouseOver" Storyboard.TargetProperty="(Rectangle.RadiusY)">
                                                                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="20" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState x:Name="MouseOver">
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundMouseOver" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState x:Name="Pressed">
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState x:Name="Disabled">
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledElement" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value=".7" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                </VisualStateGroup>
                                            </VisualStateManager.VisualStateGroups>
                                            <Rectangle x:Name="Background" Fill="#FF90C2FD" StrokeThickness="1" RadiusX="20" RadiusY="20" Opacity="0.3" />
                                            <Rectangle x:Name="BackgroundMouseOver" Fill="#FF448DCA" Stroke="#00000000" StrokeThickness="1" RadiusX="20" RadiusY="20" Opacity="0" />
                                            <Rectangle x:Name="BackgroundPressed" Fill="#FF448DCA" Stroke="#00000000" StrokeThickness="1" RadiusX="20" RadiusY="20" Opacity="0" />
                                            <Rectangle x:Name="BackgroundGradient" Stroke="#FFFFFFFF" StrokeThickness="1" RadiusX="20" RadiusY="20" Margin="1" Opacity="0">
                                                <Rectangle.Fill>
                                                    <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                                                        <GradientStop Color="#FFFFFFFF" Offset="0.013" />
                                                        <GradientStop Color="#F9FFFFFF" Offset="0.375" />
                                                        <GradientStop Color="#E5FFFFFF" Offset="0.603" />
                                                        <GradientStop Color="#C6FFFFFF" Offset="1" />
                                                    </LinearGradientBrush>
                                                </Rectangle.Fill>
                                            </Rectangle>
                                            <Rectangle x:Name="Highlight" Stroke="#FF6DBDD1" StrokeThickness="1" RadiusX="20" RadiusY="20" Margin="1" IsHitTestVisible="false" Opacity="0" />
                                            <Path Stretch="Uniform" Height="8" Width="4" Data="F1 M 110.692,342.252L 110.692,352.682L 104.594,347.467L 110.692,342.252 Z " RenderTransformOrigin="0.5,0.5">
                                                <Path.RenderTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform ScaleX="2" ScaleY="2" />
                                                        <SkewTransform AngleX="0" AngleY="0" />
                                                        <RotateTransform Angle="0" />
                                                        <TranslateTransform />
                                                    </TransformGroup>
                                                </Path.RenderTransform>
                                                <Path.Fill>
                                                    <SolidColorBrush x:Name="ButtonColor" Color="#FF537DD1" />
                                                </Path.Fill>
                                            </Path>
                                            <Rectangle x:Name="DisabledElement" Fill="#FFFFFFFF" RadiusX="2" RadiusY="2" Opacity="0" />
                                        </Grid>
                                    </ControlTemplate>
                                    <ControlTemplate x:Key="VerticalIncrementTemplate" TargetType="RepeatButton">
                                        <Grid x:Name="Root">
                                            <VisualStateManager.VisualStateGroups>
                                                <VisualStateGroup x:Name="CommonStates">
                                                    <VisualState x:Name="Normal" />
                                                    <VisualState x:Name="MouseOver">
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundMouseOver" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState x:Name="Pressed">
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState x:Name="Disabled">
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledElement" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value=".7" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                </VisualStateGroup>
                                            </VisualStateManager.VisualStateGroups>
                                            <Rectangle x:Name="Background" Fill="#FF1F3B53" StrokeThickness="1" RadiusX="2" RadiusY="2" Opacity="0">
                                                <Rectangle.Stroke>
                                                    <LinearGradientBrush EndPoint="1,.5" StartPoint="0,.5">
                                                        <GradientStop Color="#FF647480" Offset="1" />
                                                        <GradientStop Color="#FFAEB7BF" Offset="0" />
                                                        <GradientStop Color="#FF919EA7" Offset="0.35" />
                                                        <GradientStop Color="#FF7A8A99" Offset="0.35" />
                                                    </LinearGradientBrush>
                                                </Rectangle.Stroke>
                                            </Rectangle>
                                            <Rectangle x:Name="BackgroundMouseOver" Fill="#FF448DCA" Stroke="#00000000" StrokeThickness="1" RadiusX="2" RadiusY="2" Opacity="0" />
                                            <Rectangle x:Name="BackgroundPressed" Fill="#FF448DCA" Stroke="#00000000" StrokeThickness="1" RadiusX="2" RadiusY="2" Opacity="0" />
                                            <Rectangle x:Name="BackgroundGradient" Stroke="#FFFFFFFF" StrokeThickness="1" RadiusX="1" RadiusY="1" Margin="1" Opacity="0">
                                                <Rectangle.Fill>
                                                    <LinearGradientBrush EndPoint="1,.7" StartPoint="0,.7">
                                                        <GradientStop Color="#FFFFFFFF" Offset="0.013" />
                                                        <GradientStop Color="#F9FFFFFF" Offset="0.375" />
                                                        <GradientStop Color="#E5FFFFFF" Offset="0.603" />
                                                        <GradientStop Color="#C6FFFFFF" Offset="1" />
                                                    </LinearGradientBrush>
                                                </Rectangle.Fill>
                                            </Rectangle>
                                            <Rectangle x:Name="Highlight" Stroke="#FF6DBDD1" StrokeThickness="1" RadiusX="1" RadiusY="1" Margin="1" IsHitTestVisible="false" Opacity="0" />
                                            <Path Stretch="Uniform" Height="4" Width="8" Data="F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z ">
                                                <Path.Fill>
                                                    <SolidColorBrush x:Name="ButtonColor" Color="#FF333333" />
                                                </Path.Fill>
                                            </Path>
                                            <Rectangle x:Name="DisabledElement" Fill="#FFFFFFFF" RadiusX="2" RadiusY="2" Opacity="0" />
                                        </Grid>
                                    </ControlTemplate>
                                    <ControlTemplate x:Key="VerticalDecrementTemplate" TargetType="RepeatButton">
                                        <Grid x:Name="Root">
                                            <VisualStateManager.VisualStateGroups>
                                                <VisualStateGroup x:Name="CommonStates">
                                                    <VisualState x:Name="Normal" />
                                                    <VisualState x:Name="MouseOver">
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundMouseOver" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState x:Name="Pressed">
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState x:Name="Disabled">
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledElement" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value=".7" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                </VisualStateGroup>
                                            </VisualStateManager.VisualStateGroups>
                                            <Rectangle x:Name="Background" Fill="#FF1F3B53" StrokeThickness="1" RadiusX="2" RadiusY="2" Opacity="0">
                                                <Rectangle.Stroke>
                                                    <LinearGradientBrush EndPoint="1,.5" StartPoint="0,.5">
                                                        <GradientStop Color="#FF647480" Offset="1" />
                                                        <GradientStop Color="#FFAEB7BF" Offset="0" />
                                                        <GradientStop Color="#FF919EA7" Offset="0.35" />
                                                        <GradientStop Color="#FF7A8A99" Offset="0.35" />
                                                    </LinearGradientBrush>
                                                </Rectangle.Stroke>
                                            </Rectangle>
                                            <Rectangle x:Name="BackgroundMouseOver" Fill="#FF448DCA" Stroke="#00000000" StrokeThickness="1" RadiusX="2" RadiusY="2" Opacity="0" />
                                            <Rectangle x:Name="BackgroundPressed" Fill="#FF448DCA" Stroke="#00000000" StrokeThickness="1" RadiusX="2" RadiusY="2" Opacity="0" />
                                            <Rectangle x:Name="BackgroundGradient" Stroke="#FFFFFFFF" StrokeThickness="1" RadiusX="1" RadiusY="1" Margin="1" Opacity="0">
                                                <Rectangle.Fill>
                                                    <LinearGradientBrush EndPoint="1,.7" StartPoint="0,.7">
                                                        <GradientStop Color="#FFFFFFFF" Offset="0.013" />
                                                        <GradientStop Color="#F9FFFFFF" Offset="0.375" />
                                                        <GradientStop Color="#E5FFFFFF" Offset="0.603" />
                                                        <GradientStop Color="#C6FFFFFF" Offset="1" />
                                                    </LinearGradientBrush>
                                                </Rectangle.Fill>
                                            </Rectangle>
                                            <Rectangle x:Name="Highlight" Stroke="#FF6DBDD1" StrokeThickness="1" RadiusX="1" RadiusY="1" Margin="1" IsHitTestVisible="false" Opacity="0" />
                                            <Path Stretch="Uniform" Height="4" Width="8" Data="F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z ">
                                                <Path.Fill>
                                                    <SolidColorBrush x:Name="ButtonColor" Color="#FF333333" />
                                                </Path.Fill>
                                            </Path>
                                            <Rectangle x:Name="DisabledElement" Fill="#FFFFFFFF" RadiusX="2" RadiusY="2" Opacity="0" />
                                        </Grid>
                                    </ControlTemplate>
                                    <ControlTemplate x:Key="VerticalThumbTemplate" TargetType="Thumb">
                                        <Grid>
                                            <VisualStateManager.VisualStateGroups>
                                                <VisualStateGroup x:Name="CommonStates">
                                                    <VisualState x:Name="Normal" />
                                                    <VisualState x:Name="MouseOver">
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundMouseOver" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState x:Name="Pressed">
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState x:Name="Disabled">
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="0" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                </VisualStateGroup>
                                            </VisualStateManager.VisualStateGroups>
                                            <Grid x:Name="ThumbVisual" Margin="1,0,1,0">
                                                <Rectangle x:Name="Background" Fill="#FF1F3B53" StrokeThickness="1" RadiusX="2" RadiusY="2">
                                                    <Rectangle.Stroke>
                                                        <LinearGradientBrush EndPoint="1,.5" StartPoint="0,.5">
                                                            <GradientStop Color="#FF818F99" Offset="1" />
                                                            <GradientStop Color="#FFC2C9CE" Offset="0" />
                                                            <GradientStop Color="#FFB3BBC1" Offset="0.35" />
                                                            <GradientStop Color="#FF96A4B1" Offset="0.35" />
                                                        </LinearGradientBrush>
                                                    </Rectangle.Stroke>
                                                </Rectangle>
                                                <Rectangle x:Name="BackgroundMouseOver" Fill="#FF448DCA" Stroke="#00000000" StrokeThickness="1" RadiusX="2" RadiusY="2" Opacity="0" />
                                                <Rectangle x:Name="BackgroundPressed" Fill="#FF448DCA" Stroke="#00000000" StrokeThickness="1" RadiusX="2" RadiusY="2" Opacity="0" />
                                                <Rectangle x:Name="BackgroundGradient" Stroke="#FFFFFFFF" StrokeThickness="1" RadiusX="1" RadiusY="1" Margin="1">
                                                    <Rectangle.Fill>
                                                        <LinearGradientBrush EndPoint="1,.7" StartPoint="0,.7">
                                                            <GradientStop Color="#FFFFFFFF" Offset="0" />
                                                            <GradientStop Color="#F9FFFFFF" Offset="0.375" />
                                                            <GradientStop Color="#E5FFFFFF" Offset="0.6" />
                                                            <GradientStop Color="#C6FFFFFF" Offset="1" />
                                                        </LinearGradientBrush>
                                                    </Rectangle.Fill>
                                                </Rectangle>
                                                <Rectangle x:Name="Highlight" Stroke="#FF6DBDD1" StrokeThickness="1" RadiusX="1" RadiusY="1" Margin="1" IsHitTestVisible="false" Opacity="0" />
                                            </Grid>
                                        </Grid>
                                    </ControlTemplate>
                                    <ControlTemplate x:Key="HorizontalThumbTemplate" TargetType="Thumb">
                                        <Grid>
                                            <VisualStateManager.VisualStateGroups>
                                                <VisualStateGroup x:Name="CommonStates">
                                                    <VisualState x:Name="Normal" />
                                                    <VisualState x:Name="MouseOver">
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundMouseOver" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState x:Name="Pressed">
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                                <SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF" />
                                                            </ColorAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState x:Name="Disabled">
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="Opacity">
                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="0" />
                                                            </DoubleAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                </VisualStateGroup>
                                            </VisualStateManager.VisualStateGroups>
                                            <Grid x:Name="ThumbVisual" Margin="0,1,0,1">
                                                <Rectangle x:Name="Background" Fill="#FF1F3B53" StrokeThickness="1" RadiusX="2" RadiusY="2">
                                                    <Rectangle.Stroke>
                                                        <LinearGradientBrush EndPoint=".5,1" StartPoint=".5,0">
                                                            <GradientStop Color="#FF818F99" Offset="1" />
                                                            <GradientStop Color="#FFC2C9CE" Offset="0" />
                                                            <GradientStop Color="#FFB3BBC1" Offset="0.35" />
                                                            <GradientStop Color="#FF96A4B1" Offset="0.35" />
                                                        </LinearGradientBrush>
                                                    </Rectangle.Stroke>
                                                </Rectangle>
                                                <Rectangle x:Name="BackgroundMouseOver" Fill="#FF448DCA" Stroke="#00000000" StrokeThickness="1" RadiusX="2" RadiusY="2" Opacity="0" />
                                                <Rectangle x:Name="BackgroundPressed" Fill="#FF448DCA" Stroke="#00000000" StrokeThickness="1" RadiusX="2" RadiusY="2" Opacity="0" />
                                                <Rectangle x:Name="BackgroundGradient" Stroke="#FFFFFFFF" StrokeThickness="1" RadiusX="1" RadiusY="1" Margin="1">
                                                    <Rectangle.Fill>
                                                        <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                                                            <GradientStop Color="#FFFFFFFF" Offset="0.013" />
                                                            <GradientStop Color="#F9FFFFFF" Offset="0.375" />
                                                            <GradientStop Color="#E5FFFFFF" Offset="0.603" />
                                                            <GradientStop Color="#C6FFFFFF" Offset="1" />
                                                        </LinearGradientBrush>
                                                    </Rectangle.Fill>
                                                </Rectangle>
                                                <Rectangle x:Name="Highlight" Stroke="#FF6DBDD1" StrokeThickness="1" RadiusX="1" RadiusY="1" Margin="1" IsHitTestVisible="false" Opacity="0" />
                                            </Grid>
                                        </Grid>
                                    </ControlTemplate>
                                </Grid.Resources>
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualState x:Name="Normal" />
                                        <VisualState x:Name="MouseOver" />
                                        <VisualState x:Name="Disabled">
                                            <Storyboard>
                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                                    <SplineDoubleKeyFrame KeyTime="0" Value="0.5" />
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <Grid x:Name="HorizontalRoot" Visibility="Visible">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Rectangle StrokeThickness="1" RadiusX="1" RadiusY="1" Grid.ColumnSpan="5" d:IsHidden="True" />
                                    <Rectangle StrokeThickness="1" RadiusX="1" RadiusY="1" Grid.ColumnSpan="5" d:IsHidden="True" />
                                    <Rectangle StrokeThickness="1" RadiusX="1" RadiusY="1" Opacity=".375" Grid.ColumnSpan="5" d:IsHidden="True" />
                                    <Rectangle RadiusX="1" RadiusY="1" Margin="1" Grid.ColumnSpan="5" d:IsHidden="True" />
                                    <RepeatButton x:Name="HorizontalSmallDecrease" Width="18" Margin="5" IsTabStop="False" Template="{StaticResource HorizontalDecrementTemplate}" Grid.Column="0" Interval="50" Background="{x:Null}" BorderBrush="{x:Null}" />
                                    <RepeatButton x:Name="HorizontalLargeDecrease" Width="18" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Column="1" Interval="50" Background="{x:Null}" BorderBrush="{x:Null}" />
                                    <!--<Thumb x:Name="HorizontalThumb" MinWidth="18" Width="18" Template="{StaticResource HorizontalThumbTemplate}" Grid.Column="2" d:IsHidden="True" Background="{x:Null}" BorderBrush="{x:Null}"/>-->
                                    <RepeatButton x:Name="HorizontalLargeIncrease" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Column="3" Interval="50" BorderBrush="{x:Null}" Background="{x:Null}" />
                                    <RepeatButton x:Name="HorizontalSmallIncrease" Margin="5" Width="18" IsTabStop="False" Template="{StaticResource HorizontalIncrementTemplate}" Grid.Column="4" Interval="50" Background="{x:Null}" BorderBrush="{x:Null}" />
                                </Grid>
                                <Grid x:Name="VerticalRoot" Visibility="Collapsed" d:IsHidden="True">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="*" />
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Rectangle StrokeThickness="1" RadiusX="1" RadiusY="1" Grid.RowSpan="5" Margin="0,0,-9,0" />
                                    <Rectangle StrokeThickness="1" RadiusX="1" RadiusY="1" Opacity=".375" Grid.RowSpan="5" Margin="0,0,-9,0" />
                                    <Rectangle RadiusX="1" RadiusY="1" Margin="2,1,-8,1" Grid.RowSpan="5" />
                                    <RepeatButton x:Name="VerticalSmallDecrease" Height="16" Margin="1" IsTabStop="False" Template="{StaticResource VerticalDecrementTemplate}" Grid.Row="0" Interval="50" />
                                    <RepeatButton x:Name="VerticalLargeDecrease" Height="0" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Row="1" Interval="50" />
                                    <Thumb x:Name="VerticalThumb" Height="18" MinHeight="18" Template="{StaticResource VerticalThumbTemplate}" Grid.Row="2" d:IsHidden="True" />
                                    <RepeatButton x:Name="VerticalLargeIncrease" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Row="3" Interval="50" />
                                    <RepeatButton x:Name="VerticalSmallIncrease" Height="16" Margin="1" IsTabStop="False" Template="{StaticResource VerticalIncrementTemplate}" Grid.Row="4" Interval="50" />
                                </Grid>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
     
        </UserControl.Resources>
        <Grid x:Name="LayoutRoot" Width="Auto" Background="#dbe6ea" LayoutUpdated="LayoutRoot_LayoutUpdated">
            <Grid.Resources>
                 
            </Grid.Resources>
     
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Border BorderBrush="#bed8d9" BorderThickness="1" Background="White" Margin="5" CornerRadius="5" Height="Auto" Width="Auto">
                <StackPanel Orientation="Vertical" Grid.Column="0" Grid.Row="1">
                    <Border BorderBrush="#bed8d9" Margin="10" BorderThickness="1" Background="White" CornerRadius="3" Height="460">
                        <telerikNavigation:RadTileView Name="dragDockPanelHost" Height="460"
                                                       telerikControl:RadDragAndDropManager.AllowDrop="True" IsItemDraggingEnabled="True" Grid.Row="0" Grid.Column="0">
                        </telerikNavigation:RadTileView>
                    </Border>
                     
                            <telerik:RadWrapPanel x:Name="imageContainer" IsAnimated="True" UseLayoutRounding="True">
                                <ListBox VerticalAlignment="Top" x:Name="lstExpandView" BorderBrush="Brown" BorderThickness="1"
                                         ItemsPanel="{StaticResource IPnlTemp}"
                                         dragDrop:RadDragAndDropManager.AllowDrag="True"
                                         dragDrop:RadDragAndDropManager.AllowDrop="True"
                                         Height="103"
                                         Style="{StaticResource LstBoxStyl}" ItemTemplate="{StaticResource itemTem}">
                                </ListBox>
                            </telerik:RadWrapPanel>
                         
                     
                </StackPanel>
            </Border>
             
        </Grid>
     
    </UserControl>


Back to Top