<UserControl x:Class="Gallery.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:b="http://schemas.microsoft.com/xaml/behaviors" 
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:local="clr-namespace:Gallery"
        mc:Ignorable="d"
        FontFamily="{StaticResource Font.Family.Default}"
        FontSize="{StaticResource Font.Size.Normal}"
        Foreground="{StaticResource Brush.Foreground.Normal}"
        Background="{StaticResource MainWindowBackground}"
        UseLayoutRounding="True"
        d:DesignWidth="1280" d:DesignHeight="768"
        d:DataContext="{d:DesignInstance {x:Type local:MainWindow}, IsDesignTimeCreatable=True}">
    <Window.Resources>
        <sys:Double x:Key="SelectorBarWidth">215</sys:Double>
        <Storyboard x:Key="ShowContainer1">
            <BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsEnabled)" Storyboard.TargetName="SelectorTree">
                <DiscreteBooleanKeyFrame KeyTime="0:0:0" Value="False"/>
                <DiscreteBooleanKeyFrame KeyTime="0:0:0.8" Value="True"/>
            </BooleanAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="WelcomeScreen">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.4" Value="{x:Static Visibility.Collapsed}"/>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="SampleContainer2">
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="-50">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CircleEase EasingMode="EaseIn"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <EasingDoubleKeyFrame KeyTime="0:0:0.41" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SampleContainer1">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.4" Value="{x:Static Visibility.Visible}"/>
            </ObjectAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SampleContainer2">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.4" Value="{x:Static Visibility.Collapsed}"/>
            </ObjectAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Fade">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
                <DiscreteObjectKeyFrame KeyTime="0:0:0.8" Value="{x:Static Visibility.Collapsed}"/>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(Brush.Opacity)" Storyboard.TargetName="Fade">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="ShowContainer2">
            <BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsEnabled)" Storyboard.TargetName="SelectorTree">
                <DiscreteBooleanKeyFrame KeyTime="0:0:0" Value="False"/>
                <DiscreteBooleanKeyFrame KeyTime="0:0:0.8" Value="True"/>
            </BooleanAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="WelcomeScreen">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.4" Value="{x:Static Visibility.Collapsed}"/>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="SampleContainer1">
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="-50">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CircleEase EasingMode="EaseIn"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <EasingDoubleKeyFrame KeyTime="0:0:0.41" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SampleContainer1">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.4" Value="{x:Static Visibility.Collapsed}"/>
            </ObjectAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SampleContainer2">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.4" Value="{x:Static Visibility.Visible}"/>
            </ObjectAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Fade">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
                <DiscreteObjectKeyFrame KeyTime="0:0:0.8" Value="{x:Static Visibility.Collapsed}"/>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(Brush.Opacity)" Storyboard.TargetName="Fade">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="ExpandSelector">
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SampleOverlay">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SelectorBarExpander" Storyboard.TargetProperty="LayoutTransform.ScaleX">
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CircleEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SelectorHeader" Storyboard.TargetProperty="RenderTransform.X">
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="-8"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CircleEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SelectorTree" Storyboard.TargetProperty="RenderTransform.X">
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="-16"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CircleEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Links" Storyboard.TargetProperty="RenderTransform.X">
                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="-8"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CircleEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="CollapseSelector">
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SampleOverlay">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}"/>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SelectorBarExpander" Storyboard.TargetProperty="LayoutTransform.ScaleX">
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CircleEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SelectorHeader" Storyboard.TargetProperty="RenderTransform.X">
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="-8">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CircleEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SelectorTree" Storyboard.TargetProperty="RenderTransform.X">
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="-16">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CircleEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Links" Storyboard.TargetProperty="RenderTransform.X">
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="-8">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CircleEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="ExpandSelectorInstant">
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SampleOverlay">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}"/>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SelectorBarExpander" Storyboard.TargetProperty="LayoutTransform.ScaleX">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SelectorHeader" Storyboard.TargetProperty="RenderTransform.X">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SelectorTree" Storyboard.TargetProperty="RenderTransform.X">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Links" Storyboard.TargetProperty="RenderTransform.X">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="CollapseSelectorInstant">
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SampleOverlay">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}"/>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SelectorBarExpander" Storyboard.TargetProperty="LayoutTransform.ScaleX">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SelectorHeader" Storyboard.TargetProperty="RenderTransform.X">
                <EasingDoubleKeyFrame KeyTime="0" Value="-8"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SelectorTree" Storyboard.TargetProperty="RenderTransform.X">
                <EasingDoubleKeyFrame KeyTime="0" Value="-16"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Links" Storyboard.TargetProperty="RenderTransform.X">
                <EasingDoubleKeyFrame KeyTime="0" Value="-8"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="DelayedCollapseSelector">
            <BooleanAnimationUsingKeyFrames Storyboard.TargetName="SelectorExpanderButton" Storyboard.TargetProperty="IsTabStop">
                <DiscreteBooleanKeyFrame KeyTime="0:0:3" Value="True"/>
            </BooleanAnimationUsingKeyFrames>
        </Storyboard>
    </Window.Resources>
    <b:Interaction.Triggers>
        <b:DataTrigger Binding="{Binding IsChecked, ElementName=SelectorExpanderButton}" Value="True">
            <b:Interaction.Behaviors>
                <b:ConditionBehavior>
                    <b:ConditionalExpression>
                        <b:ComparisonCondition LeftOperand="{Binding Visibility, ElementName=SelectorExpanderButton}" RightOperand="Visible"/>
                    </b:ConditionalExpression>
                </b:ConditionBehavior>
            </b:Interaction.Behaviors>
            <b:ControlStoryboardAction Storyboard="{StaticResource ExpandSelector}"/>
        </b:DataTrigger>
        <b:DataTrigger Binding="{Binding IsChecked, ElementName=SelectorExpanderButton}" Value="False">
            <b:Interaction.Behaviors>
                <b:ConditionBehavior>
                    <b:ConditionalExpression>
                        <b:ComparisonCondition LeftOperand="{Binding Visibility, ElementName=SelectorExpanderButton}" RightOperand="Visible"/>
                    </b:ConditionalExpression>
                </b:ConditionBehavior>
            </b:Interaction.Behaviors>
            <b:ControlStoryboardAction Storyboard="{StaticResource CollapseSelector}"/>
        </b:DataTrigger>
        <b:DataTrigger Binding="{Binding IsChecked, ElementName=SelectorExpanderButton}" Value="True">
            <b:Interaction.Behaviors>
                <b:ConditionBehavior>
                    <b:ConditionalExpression>
                        <b:ComparisonCondition LeftOperand="{Binding Visibility, ElementName=SelectorExpanderButton}" Operator="NotEqual" RightOperand="Visible"/>
                    </b:ConditionalExpression>
                </b:ConditionBehavior>
            </b:Interaction.Behaviors>
            <b:ControlStoryboardAction Storyboard="{StaticResource ExpandSelectorInstant}"/>
        </b:DataTrigger>
        <b:DataTrigger Binding="{Binding IsChecked, ElementName=SelectorExpanderButton}" Value="False">
            <b:Interaction.Behaviors>
                <b:ConditionBehavior>
                    <b:ConditionalExpression>
                        <b:ComparisonCondition LeftOperand="{Binding Visibility, ElementName=SelectorExpanderButton}" Operator="NotEqual" RightOperand="Visible"/>
                    </b:ConditionalExpression>
                </b:ConditionBehavior>
            </b:Interaction.Behaviors>
            <b:ControlStoryboardAction Storyboard="{StaticResource CollapseSelectorInstant}"/>
        </b:DataTrigger>
        <b:EventTrigger EventName="MouseLeave" SourceName="SelectorBar">
            <b:Interaction.Behaviors>
                <b:ConditionBehavior>
                    <b:ConditionalExpression>
                        <b:ComparisonCondition LeftOperand="{Binding Visibility, ElementName=SelectorExpanderButton}" RightOperand="Visible"/>
                    </b:ConditionalExpression>
                </b:ConditionBehavior>
            </b:Interaction.Behaviors>
            <b:ControlStoryboardAction Storyboard="{StaticResource DelayedCollapseSelector}"/>
        </b:EventTrigger>
        <b:EventTrigger EventName="MouseEnter" SourceName="SelectorBar">
            <b:Interaction.Behaviors>
                <b:ConditionBehavior>
                    <b:ConditionalExpression>
                        <b:ComparisonCondition LeftOperand="{Binding Visibility, ElementName=SelectorExpanderButton}" RightOperand="Visible"/>
                    </b:ConditionalExpression>
                </b:ConditionBehavior>
            </b:Interaction.Behaviors>
            <b:ControlStoryboardAction Storyboard="{StaticResource DelayedCollapseSelector}" ControlStoryboardOption="Stop"/>
            <b:ChangePropertyAction PropertyName="IsChecked" Value="True" TargetName="SelectorExpanderButton"/>
        </b:EventTrigger>
        <b:StoryboardCompletedTrigger Storyboard="{StaticResource DelayedCollapseSelector}">
            <b:Interaction.Behaviors>
                <b:ConditionBehavior>
                    <b:ConditionalExpression>
                        <b:ComparisonCondition LeftOperand="{Binding Visibility, ElementName=SelectorExpanderButton}" RightOperand="Visible"/>
                    </b:ConditionalExpression>
                </b:ConditionBehavior>
            </b:Interaction.Behaviors>
            <b:ChangePropertyAction PropertyName="IsChecked" Value="False" TargetName="SelectorExpanderButton"/>
        </b:StoryboardCompletedTrigger>
        <b:EventTrigger EventName="MouseDown" SourceName="SampleOverlay">
            <b:Interaction.Behaviors>
                <b:ConditionBehavior>
                    <b:ConditionalExpression>
                        <b:ComparisonCondition LeftOperand="{Binding Visibility, ElementName=SelectorExpanderButton}" RightOperand="Visible"/>
                    </b:ConditionalExpression>
                </b:ConditionBehavior>
            </b:Interaction.Behaviors>
            <b:ChangePropertyAction PropertyName="IsChecked" Value="False" TargetName="SelectorExpanderButton"/>
        </b:EventTrigger>
    </b:Interaction.Triggers>
  <Grid x:Name="WindowContent">
    <Grid x:Name="LayoutRoot">
        <Grid.LayoutTransform>
            <ScaleTransform/>
        </Grid.LayoutTransform>
        <Grid x:Name="SamplePanel">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Decorator x:Name="SampleOffset"/>
            <Grid Grid.Column="1">
                <Viewbox x:Name="WelcomeScreen" MaxWidth="1280" HorizontalAlignment="Center" VerticalAlignment="Center" >
                    <StackPanel Margin="200,100">
                        <StackPanel Orientation="Horizontal" Height="200" Width="1280">
                            <Path Data="{StaticResource NoesisLogoGeometry}" Fill="{StaticResource NoesisLogoBlueBg}" Stretch="Uniform"/>
                            <Path Data="{StaticResource NoesisTextGeometry}" Fill="White" Stretch="Uniform" Margin="40,0,0,0" VerticalAlignment="Center" Width="652.5" Height="92"/>
                            <Path Data="{StaticResource NoesisGuiTextGeometry}" Fill="{StaticResource NoesisLogoBlueBg}" Stretch="Uniform" Margin="40,0,0,0" VerticalAlignment="Center" Width="274.4" Height="92"/>
                        </StackPanel>
                        <Grid Margin="0,20,0,10">
                            <TextBlock Text="Controls Gallery" TextAlignment="Center" Foreground="#40000000" FontSize="80" Margin="0,4,-4,0"/>
                            <TextBlock Text="Controls Gallery" TextAlignment="Center" Foreground="White" FontSize="80"/>
                        </Grid>
                    </StackPanel>
                </Viewbox>
                <ContentControl x:Name="SampleContainer1" Visibility="Collapsed">
                    <b:Interaction.Triggers>
                        <b:DataTrigger Binding="{Binding Content, ElementName=SampleContainer1}" Comparison="NotEqual" Value="{x:Null}">
                            <b:ControlStoryboardAction Storyboard="{StaticResource ShowContainer1}"/>
                        </b:DataTrigger>
                        <b:StoryboardCompletedTrigger Storyboard="{StaticResource ShowContainer1}">
                            <b:ChangePropertyAction PropertyName="Content" Value="{x:Null}" TargetName="SampleContainer2"/>
                        </b:StoryboardCompletedTrigger>
                    </b:Interaction.Triggers>
                    <ContentControl.RenderTransform>
                        <TranslateTransform/>
                    </ContentControl.RenderTransform>
                </ContentControl>
                <ContentControl x:Name="SampleContainer2" Visibility="Collapsed">
                    <b:Interaction.Triggers>
                        <b:DataTrigger Binding="{Binding Content, ElementName=SampleContainer2}" Comparison="NotEqual" Value="{x:Null}">
                            <b:ControlStoryboardAction Storyboard="{StaticResource ShowContainer2}"/>
                        </b:DataTrigger>
                        <b:StoryboardCompletedTrigger Storyboard="{StaticResource ShowContainer2}">
                            <b:ChangePropertyAction PropertyName="Content" Value="{x:Null}" TargetName="SampleContainer1"/>
                        </b:StoryboardCompletedTrigger>
                    </b:Interaction.Triggers>
                    <ContentControl.RenderTransform>
                        <TranslateTransform/>
                    </ContentControl.RenderTransform>
                </ContentControl>
            </Grid>
            <Border x:Name="Fade" Grid.Column="1" Visibility="Collapsed" IsHitTestVisible="False">
                <Border.Background>
                    <SolidColorBrush Color="#FF154268" Opacity="0"/>
                </Border.Background>
            </Border>
            <Grid x:Name="SampleOverlay" Grid.Column="1" Background="Transparent" Visibility="Collapsed"/>
        </Grid>

        <Grid x:Name="SelectorBarPanel">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="{Binding Source={StaticResource SelectorBarWidth}}"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="SelectorExpanderButtonShadow" Background="#1F000000" CornerRadius="0,0,2,2" Height="41" Width="41" Margin="0,0,-1,-1" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                <Grid x:Name="SelectorBar" Width="{StaticResource SelectorBarWidth}" Background="{DynamicResource Brush.Window.Background}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="40"/>
                        <RowDefinition Height="1"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="1"/>
                        <RowDefinition Height="40"/>
                    </Grid.RowDefinitions>
                    <Rectangle x:Name="SelectorBarShadow" Grid.RowSpan="6" Width="8" HorizontalAlignment="Right" Margin="0,0,-8,0" Fill="{StaticResource LR_Shadow}" IsHitTestVisible="False"/>
                    <Grid Grid.Row="0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <FrameworkElement Grid.Column="0">
                            <FrameworkElement.Style>
                                <Style TargetType="FrameworkElement">
                                    <Setter Property="Width" Value="0"/>
                                    <Style.Triggers>
                                        <DataTrigger Binding="{Binding Visibility, ElementName=SelectorExpanderButton}" Value="Visible">
                                            <Setter Property="Width" Value="40"/>
                                        </DataTrigger>
                                    </Style.Triggers>
                                </Style>
                            </FrameworkElement.Style>
                        </FrameworkElement>
                        <TextBlock x:Name="SelectorHeader" Grid.Column="1" Text="Controls Gallery" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="{DynamicResource Font.Size.Header}" Margin="-5,0,0,0">
                            <TextBlock.RenderTransform>
                                <TranslateTransform X="-8"/>
                            </TextBlock.RenderTransform>
                        </TextBlock>
                    </Grid>
                    <Rectangle Grid.Row="1" Height="1" Fill="{DynamicResource Brush.Border.Disabled}"/>
                    <FrameworkElement x:Name="SelectorTreeHeightRef" Grid.Row="2"/>
                    <TreeView x:Name="SelectorTree" Grid.Row="2" Width="{StaticResource SelectorBarWidth}" ItemsSource="{Binding Categories}" Tag="{Binding SelectedSample, Mode=TwoWay}" ItemTemplate="{StaticResource SampleCategoryTemplate}" ItemContainerStyle="{StaticResource SampleSelectorItemStyle}" ScrollViewer.PanningMode="VerticalOnly">
                        <b:Interaction.Triggers>
                            <b:EventTrigger EventName="SelectedItemChanged">
                                <b:ChangePropertyAction PropertyName="Tag" Value="{Binding SelectedItem, ElementName=SelectorTree}"/>
                            </b:EventTrigger>
                        </b:Interaction.Triggers>
                        <TreeView.RenderTransform>
                            <TranslateTransform X="-16"/>
                        </TreeView.RenderTransform>
                    </TreeView>
                    <Rectangle Grid.Row="3" Height="1" Fill="{DynamicResource Brush.Border.Disabled}"/>
                    <Viewbox x:Name="Links" Grid.Row="4" VerticalAlignment="Center">
                        <Viewbox.RenderTransform>
                            <TranslateTransform X="-8"/>
                        </Viewbox.RenderTransform>
                        <StackPanel Orientation="Horizontal" Margin="50,0,60,0">
                            <Border Height="32" Margin="0,0,10,0" Background="Transparent" Cursor="Hand">
                                <b:Interaction.Triggers>
                                    <b:EventTrigger EventName="MouseLeftButtonDown">
                                        <b:LaunchUriOrFileAction Path="https://twitter.com/noesisengine"/>
                                    </b:EventTrigger>
                                </b:Interaction.Triggers>
                                <StackPanel Orientation="Horizontal" UseLayoutRounding="False">
                                    <TextBlock Text="i" FontFamily="{StaticResource IconFont}" FontSize="28" Foreground="#1DA1F2" Margin="0,-8,0,-8" VerticalAlignment="Center"/>
                                    <TextBlock Text="j" FontFamily="{StaticResource IconFont}" FontSize="16" Foreground="#1DA1F2" Margin="1,0,0,1" VerticalAlignment="Center"/>
                                    <TextBlock Text="k" FontFamily="{StaticResource IconFont}" FontSize="16" Foreground="#1DA1F2" Margin="-2.5,0,0,1" VerticalAlignment="Center"/>
                                    <TextBlock Text="l" FontFamily="{StaticResource IconFont}" FontSize="16" Foreground="#1DA1F2" Margin="-5.1,0,0,1" VerticalAlignment="Center"/>
                                    <TextBlock Text="m" FontFamily="{StaticResource IconFont}" FontSize="16" Foreground="#1DA1F2" Margin="-8.7,0,0,1" VerticalAlignment="Center"/>
                                    <TextBlock Text="m" FontFamily="{StaticResource IconFont}" FontSize="16" Foreground="#1DA1F2" Margin="-7,0,0,1" VerticalAlignment="Center"/>
                                    <TextBlock Text="n" FontFamily="{StaticResource IconFont}" FontSize="16" Foreground="#1DA1F2" Margin="-6.5,0,0,1" VerticalAlignment="Center"/>
                                    <TextBlock Text="o" FontFamily="{StaticResource IconFont}" FontSize="16" Foreground="#1DA1F2" Margin="-5.5,0,0,1" VerticalAlignment="Center"/>
                                </StackPanel>
                            </Border>
                            <Border Width="108" Margin="10,0,0,0" Background="Transparent" Cursor="Hand">
                                <b:Interaction.Triggers>
                                    <b:EventTrigger EventName="MouseLeftButtonDown">
                                        <b:LaunchUriOrFileAction Path="https://github.com/Noesis/Tutorials/tree/master/Samples/Gallery"/>
                                    </b:EventTrigger>
                                </b:Interaction.Triggers>
                                <StackPanel Orientation="Horizontal" UseLayoutRounding="False">
                                    <TextBlock Text="p" FontFamily="{StaticResource IconFont}" FontSize="24" Foreground="#F5F4F5" Margin="1,-8,0,-8" VerticalAlignment="Center"/>
                                    <TextBlock Text="q" FontFamily="{StaticResource IconFont}" FontSize="19" Foreground="#F5F4F5" Margin="5,0,0,0" VerticalAlignment="Center"/>
                                    <TextBlock Text="r" FontFamily="{StaticResource IconFont}" FontSize="19" Foreground="#F5F4F5" Margin="-8,0,0,0" VerticalAlignment="Center"/>
                                    <TextBlock Text="s" FontFamily="{StaticResource IconFont}" FontSize="19" Foreground="#F5F4F5" Margin="-11,0,0,0" VerticalAlignment="Center"/>
                                    <TextBlock Text="t" FontFamily="{StaticResource IconFont}" FontSize="19" Foreground="#F5F4F5" Margin="-7,0,0,0" VerticalAlignment="Center"/>
                                    <TextBlock Text="u" FontFamily="{StaticResource IconFont}" FontSize="19" Foreground="#F5F4F5" Margin="-4.5,0,0,0" VerticalAlignment="Center"/>
                                    <TextBlock Text="v" FontFamily="{StaticResource IconFont}" FontSize="19" Foreground="#F5F4F5" Margin="-5.5,0,0,0" VerticalAlignment="Center"/>
                                </StackPanel>
                            </Border>
                        </StackPanel>
                    </Viewbox>
                </Grid>
                <StackPanel x:Name="SelectorBarExpander" Orientation="Horizontal">
                    <StackPanel.LayoutTransform>
                        <ScaleTransform ScaleX="1"/>
                    </StackPanel.LayoutTransform>
                    <FrameworkElement Width="1"/>
                    <FrameworkElement Width="{StaticResource SelectorBarWidth}"/>
                </StackPanel>
            </StackPanel>
            <ToggleButton x:Name="SelectorExpanderButton" Width="40" Height="40" Template="{StaticResource SelectorExpanderButtonTemplate}" FocusVisualStyle="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top">
                <Path Data="M0,0L20,0M0,5L20,5M0,10L20,10" Stretch="None" Stroke="White" StrokeThickness="1" StrokeStartLineCap="Round" StrokeEndLineCap="Round"/>
            </ToggleButton>
        </Grid>

        <Grid x:Name="ThemePickerPanel">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="1*"/>
            </Grid.RowDefinitions>
            <Decorator x:Name="DropDownHeight"/>
            <Grid Grid.RowSpan="2" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="4">
                <ComboBox x:Name="ThemeColorPicker" Width="140" Height="40" Margin="0,0,56,0" HorizontalAlignment="Right" ItemsSource="{Binding ThemeColors}" SelectedItem="{Binding SelectedThemeColor}" MaxDropDownHeight="{Binding ActualHeight, ElementName=DropDownHeight}" Style="{StaticResource ColorSelectorComboBoxStyle}" ItemTemplate="{StaticResource ColorItemTemplate}" ItemContainerStyle="{StaticResource ColorSelectorComboBoxItemStyle}" Tag="Theme"/>
                <ComboBox x:Name="ThemeAccentPicker" Width="140" Height="40" Margin="0,0,12,0" HorizontalAlignment="Right" ItemsSource="{Binding ThemeAccents}" SelectedItem="{Binding SelectedThemeAccent}" MaxDropDownHeight="{Binding ActualHeight, ElementName=DropDownHeight}" Style="{StaticResource ColorSelectorComboBoxStyle}" ItemTemplate="{StaticResource ColorItemTemplate}" ItemContainerStyle="{StaticResource ColorSelectorComboBoxItemStyle}" Tag="Accent"/>
            </Grid>
        </Grid>
    </Grid>
  </Grid>
</UserControl>
